Closed nmacedo closed 2 months ago
Even a single -
or --
should be a syntax error too, right? When not in markdown-mode, that is.
As you suspected, a file stating with ---
is switched into markdown mode here, https://github.com/AlloyTools/org.alloytools.alloy/blob/master/org.alloytools.alloy.core/parser/Alloy.cup#L300
Would you like me to remove that so that it strictly goes off of the file extension?
Well over in org.alloytools.alloy.core/src/main/java/edu/mit/csail/sdg/alloy4/OurSyntaxDocument.java it also assumes this behavior. I opened up https://github.com/AlloyTools/org.alloytools.alloy/pull/265 as what I think is a correct compromise -- strictly allowing ---\n
(with a newline) to indicate that it is a markdown file.
this should be fixed nu #265
.als
models starting with a long---
are not processed and interpreted as empty. I think this has to do with markdown models (I though these needed an.md
extension?), but there is no visual indication in the editor.In fact, even with exactly
---
the syntax highlighting seems to be buggy.