Tom Gillespie <tgb...@gmail.com> writes: >> Should we allow syntax like #+KEYWORD:value to be correct or do we >> require a whitespace/space after colon all the time? > > The spec as written is ambiguous/silent on this issue. In my work on > laundry tokenizer and grammar I have found keyword syntax to be a > thorny issue, and I strongly suggest that for the time being we either > make no ruling on this or we state that the colon that ends the > keyword should be followed by a space as a precautionary measure. > The safe thing to do is to always require whitespace after the colon > because it guarantees correct interpretation.
By the way, wouldn't it be better to use tree-sitter rather than something else for the format grammar? At least, there is some work on integrating tree-sitter into Emacs core [1,2]. [1] https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00268.html [2] https://archive.casouri.cat/note/2021/emacs-tree-sitter/#Feedback Best, Ihor