asciidoctor / brackets-asciidoc-preview

Live Preview of AsciiDoc for Adobe Brackets
MIT License
50 stars 16 forks source link

AsciiDoc mode for Brackets/CodeMirror #6

Closed nerk closed 10 years ago

nerk commented 10 years ago

Investigate if this

https://atom.io/packages/language-asciidoc https://github.com/espadrine/ace2cm

can be used to create an AsciiDoc mode for Brackets/CodeMirror. This will more likely become a separate project.

mojavelinux commented 10 years ago

It's important to reference the regular expressions in Asciidoctor core as they are the canonical source of the syntax (even more so than AsciiDoc Python).

https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor.rb#L329

You can also refer to the syntax highlighting rules in Gedit.

https://github.com/mojavelinux/gtksourceview/blob/asciidoc-language-spec/data/language-specs/asciidoc.lang

Though, again, Asciidoctor core should be treated as the canonical source.

nerk commented 10 years ago

Absolutely, the actual rules in Asciidoctor should be the canonical source. However, for a first result, I simply used the mode created by https://github.com/espadrine/LivesciiDoc

It contains the Ace version of syntax highlighting converted to CodeMirror. Seems to be quite usable already. To be honest, creating a syntax mode does not look like a fun task. Mode can be refined later.