asciidoctor-comment-links
An Asciidoctor extension that turns the link in the comment of the source block into a clickable jump link.
|
đź’ˇ
|
This extension supports the Rouge, CodeRay, Pygments, and highlight.js source highlighters. For Rouge, CodeRay, and Pygments the links are added when the document is converted. Since highlight.js performs highlighting in the browser, this extension injects a small script that turns URLs in comments into links after highlight.js has run. |
The highlighter is selected with Asciidoctor’s source-highlighter attribute.
When that attribute is not set, this extension falls back to Rouge. Install
only the highlighter you intend to use: gem install rouge, gem install
coderay, or gem install pygments.rb.
Installation
This extension is published on RubyGems as asciidoctor-comment-links. Install the gem by adding it to your project’s Gemfile or gemspec and running Bundler. Or install it directly:
$ gem install asciidoctor-comment-linksUsage
Be sure to use Asciidoctor v2.0.0 or later.
$ asciidoctor -V
Asciidoctor 2.0.0 [https://asciidoctor.org]Use Asciidoctor’s --require option like this:
$ asciidoctor -r asciidoctor-comment-links sample.adocContributing
-
Share this project with someone else who may be interested
-
Contribute a fix for a currently open issues (if any) using a GitHub pull request (please discuss before working on any large changes)
-
Submit your comments or your ideas on Discuss on chat.asciidoctor.org.
-
Open a new issue for a problem you’ve discovered or a possible enhancement
Thank you for your support!