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 CodeMirror support for syntax highlighting #1331

Closed
nawroth opened this issue May 4, 2015 · 3 comments
Closed

Add CodeMirror support for syntax highlighting #1331

nawroth opened this issue May 4, 2015 · 3 comments
Assignees

Comments

@nawroth
Copy link

nawroth commented May 4, 2015

This would improve consistency when writing documentation for an application which uses CodeMirror in its user interface.

@Hocdoc
Copy link

Hocdoc commented May 4, 2015

@mojavelinux mojavelinux added this to the v1.5.4 milestone May 4, 2015
@mojavelinux mojavelinux modified the milestones: v1.5.4, v1.6.0 Dec 21, 2015
@mojavelinux mojavelinux modified the milestones: v1.6.0, M2 Jan 9, 2019
@mojavelinux mojavelinux modified the milestones: M2, v2.0.0 Mar 23, 2019
@mojavelinux mojavelinux self-assigned this Mar 23, 2019
@mojavelinux mojavelinux removed this from the v2.0.0 milestone Mar 23, 2019
@mojavelinux
Copy link
Member

As of Asciidoctor 2.0, this is now possible using the new syntax highlighter API. This should be done as an extension. It can be published and shared as a RubyGem.

Here's the API you need to use: https://www.rubydoc.info/gems/asciidoctor/2.0.0/Asciidoctor/SyntaxHighlighter

Here's an example that shows how to use the API to integrate Prism: https://gist.github.com/mojavelinux/850373bb1b5a8e0334b4038e90617509

@mojavelinux
Copy link
Member

I see that this request could also be interpreted as the other way around. To add AsciiDoc syntax highlighting in CodeMirror. That can be found here: https://github.com/asciidoctor/codemirror-asciidoc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants