-
Prior to perhaps prepare a PR, and because I'm not familiar with the Haskel language, I would like to rise the question about a third keyword Pandoc observation:GitHub flavored markdown files allow to fence snippets of code blocks with a tag about the language they represent, for instance print("hello") or for Fortran program test
print *, "hello"
end program test introduced by a line of with It equally is possible to use a tag program test
print *, "hello"
end program test on GitHub in the markdown files, issue reports; or e.g. on the discussion board of fortran-lang.org. Beside brevity as tag, Second, I see i) questionTo provide the third Fortran indicator to pandoc, would it suffice to add |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
What pandoc version, and what format are you converting to?
|
Beta Was this translation helpful? Give feedback.
-
You are correct; both keywords to fence snippets of Fortran are in place, and both are functional. However, while editing a draft about object oriented programming in Fortran (link), I observed their working differs a little bit. Eventually, I had to stick to If one copies the following as Fenced with `f90` -- correct rendering
```f90
TYPE :: sorted_list
PRIVATE
TYPE(sortable) :: data
TYPE(sorted_list), POINTER :: next => null()
CONTAINS
FINAL :: delete_sorted_list
END TYPE
```
Fenced with `fortran` -- unresolved representation
```fortran
TYPE :: sorted_list
PRIVATE
TYPE(sortable) :: data
TYPE(sorted_list), POINTER :: next => null()
CONTAINS
FINAL :: delete_sorted_list
END TYPE
``` the visual result of the conversion with Pandoc 3.3 differs for either pandoc snippet.md -s -o snippet.html
pandoc snippet.md -s -o snippet.pdf -t ms A closer inspection of an intermediate file, for instance the .ms file, reveals $ pandoc snippet.md -s -o snippet.ms
$ grep CONTAINS snippet.ms -n
125:\*[KeywordTok "CONTAINS"]
139:\*[CommentTok "CONTAINS"] once the keyword is resolved as such, the other time (erroneously) processed as a comment. The dictionary accessed by the keyword Addition: I just notice a different visual representation on GitHub, too. Fenced with TYPE :: sorted_list
PRIVATE
TYPE(sortable) :: data
TYPE(sorted_list), POINTER :: next => null()
CONTAINS
FINAL :: delete_sorted_list
END TYPE vs fenced with TYPE :: sorted_list
PRIVATE
TYPE(sortable) :: data
TYPE(sorted_list), POINTER :: next => null()
CONTAINS
FINAL :: delete_sorted_list
END TYPE |
Beta Was this translation helpful? Give feedback.
-
In a thread about syntax lexers on fortran-lang.org, I amended my answer with your information (link). Thank you. |
Beta Was this translation helpful? Give feedback.
In skylighting, there are two distinct lexers (derived from KDE's syntax highlighters): fortran-fixed and fortran-free. The latter is used with
f90
, the former withfortran
.