This language-spec was written by Sciancisco in 2020 and was originally available at GitLab and GitHub Gist. I made some small updates to the file, recorded at the beginning of the file as a comment, just below the copyright.
My changes:
- at <language>
- name: the "G" of "Groff" was capitalized.
- at <metadata>
- mimetypes and globs: completely changed based upon All known MIME types and their filename patterns.
- at <definitions><context>
- comment-new and comment-old: the "." (dot) was included as part of the comment. Added "\.".
Known Bugs:
It works fine, but with a very small issue, noticed in bash.1.gz when opened in xed (gedit clone for Cinnamon):
-
starts at line 5932:
.B isearch\-terminators (``C\-[C\-J'')
-
ends at line 6744:
.B character\-search (C\-])
All the content between lines 5932-6744 are considered escape-bracket-parameter as in gross.lang, line 91:
91 <context id="escape-bracket-parameter" style-ref="escaped-character" class="no-spell-check">
92 <start>\\.[[]</start>
93 <end>[]]</end>
94 </context>
It occurs because in groff, anything between \*[ and ] (this * is also a regex, means any or no one) are readed as an escape sequence (see in GNU Groff).
In above example (bash.1.gz), the \-[ in (``C\-[C\-J'')
matches the start of a escape sequence, while the ] in (C\-])
matches the end.
In other words, it's not exactly a bug. And it's very rare to happen. Basically it only occurs in quite complex roff documents.
Conclusion:
It works great in most documents, so I believe it's an excellent inclusion.