Skip to content
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 scdoc syntax highlighting #41

Merged
merged 13 commits into from
Oct 31, 2019
Merged

add scdoc syntax highlighting #41

merged 13 commits into from
Oct 31, 2019

Conversation

mossheim
Copy link
Contributor

@mossheim mossheim commented Apr 7, 2018

This PR adds highlighting for schelp files. The choices of highlighting links are totally arbitrary and open to discussion. I tried to follow the markup syntax as best I could; features include:

  • highlighting for all scdoc tags
  • specialized formatting for strong, emphasis, soft, link, anchor, image regions
  • you get highlighting of code blocks "for free" using syn include
  • nested trees, tables, other structures
  • notes and warnings containing nested modal tags (strong::, etc) are highlighted

@mossheim
Copy link
Contributor Author

mossheim commented Apr 8, 2018

The only thing I don't like that I can't figure out how to fix is highlighting within inline code sections. Right now in code::test::, the sc highlighting picks up test: as a keyword selector, presumably because it's using lookahead in its regex(?). I tried several times to fix this but none of them worked. I'm considering just turning it off for inline code and leaving it only for code blocks.

@dvzrv
Copy link
Member

dvzrv commented Sep 29, 2018

This looks very useful!
@brianlheim if you disable this for code::test::, can you add a a comment saying why (e.g. test: gets picked up as keyword selector - needs further investigation)?

Copy link
Member

@capocasa capocasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff Brian! Mentioned issue does not seem to be a blocker to me.

@capocasa capocasa merged commit f5b6b8d into master Oct 31, 2019
@mossheim mossheim deleted the topic/scdoc branch October 31, 2019 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants