diff --git a/CHANGES.md b/CHANGES.md
index 7e109ef88a..eb09ba1b6b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -39,6 +39,7 @@ Core Grammars:
- enh(markdown) add entity support [David Schach][] [TaraLei][]
- enh(css) add `justify-items` and `justify-self` attributes [Vasily Polovnyov][]
- enh(css) add `accent-color`, `appearance`, `color-scheme`, `rotate`, `scale` and `translate` attributes [Carl Räfting][]
+- fix(fortran) fixes parsing of keywords delimited by dots [Julien Bloino][]
New Grammars:
@@ -90,6 +91,7 @@ Themes:
[Rúnar Bjarnason]: https://github.com/runarorama
[Carl Räfting]: https://github.com/carlrafting
[BackupMiles]: https://github.com/BackupMiles
+[Julien Bloino]: https://github.com/jbloino
diff --git a/src/languages/fortran.js b/src/languages/fortran.js
index 91b8f46598..aa3d2b4fc0 100644
--- a/src/languages/fortran.js
+++ b/src/languages/fortran.js
@@ -550,6 +550,7 @@ export default function(hljs) {
'f95'
],
keywords: {
+ $pattern: /\b[a-z][a-z0-9_]+\b|\.[a-z][a-z0-9_]+\./,
keyword: KEYWORDS,
literal: LITERALS,
built_in: BUILT_INS
diff --git a/test/markup/fortran/dot_keywords.expect.txt b/test/markup/fortran/dot_keywords.expect.txt
new file mode 100644
index 0000000000..e973e13bf0
--- /dev/null
+++ b/test/markup/fortran/dot_keywords.expect.txt
@@ -0,0 +1,8 @@
+logical :: A=.true., B=.false., C=.true., D=.false.
+logical :: E
+
+E = 3 < 4 .and. B
+E = 'ij' <= 'ijk' .and. C
+E = B .or. A .and. D
+E = (B .or. A) .and. C
+E = A .and. .not.B
diff --git a/test/markup/fortran/dot_keywords.txt b/test/markup/fortran/dot_keywords.txt
new file mode 100644
index 0000000000..63d0aa4d00
--- /dev/null
+++ b/test/markup/fortran/dot_keywords.txt
@@ -0,0 +1,8 @@
+logical :: A=.true., B=.false., C=.true., D=.false.
+logical :: E
+
+E = 3 < 4 .and. B
+E = 'ij' <= 'ijk' .and. C
+E = B .or. A .and. D
+E = (B .or. A) .and. C
+E = A .and. .not.B