-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add syntax highlighting. #20
Comments
I think CodeMirror has its own predefined syntax-highlighting for particular languages, and apart from that it only has a default mode, as can be seen here in runmode/colorize.js under the addons heading |
I read more and found out that we can provide CodeMirror a list of keywords that have a particular syntax highlighting. |
CodeMirror is now integrated but we need to write our own mode for the Seed syntax. Seed itself doesn't have very many keywords, it's more a base structure of a block identifier (ends with a colon), phrase (starts with - ), phrase continuation line (starts with " ")... Inside of each phrase we could use a HTML mixed-mode highlighter that higlights HTML and inline CSS. |
Looking good! 👍 |
Here's some info on writing a custom mode in CodeMirror: |
Perhaps the simple mode is enough: http://codemirror.net/demo/simplemode.html |
@fdb I would like to work. |
Currently it can be quite cumbersome to spot mistakes. Syntax highlighting will help a lot, but this depends on #19.
The text was updated successfully, but these errors were encountered: