diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-01-26 03:34:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-26 03:34:56 -0700 |
| commit | 23ddbaed6818025cbe74365fec7e8101f34eadca (patch) | |
| tree | 7220c71ed00ab456c43ec9febb20c69e090e07d7 /test/lists_test.rb | |
| parent | 22d08e5bd2155496edd32cd55557683441f6a181 (diff) | |
resolves #2106 make syntax highlighter pluggable (PR #3016)
- define the Asciidoctor::SyntaxHighlighter module to handle all aspects of syntax highlighting
- define built-in SyntaxHighlighter adapters for coderay, pygments, highlight.js, html-pipeline, and prettify
- move all embedded syntax highlighting logic into SyntaxHighlighter adapters
- allow SyntaxHighlighter adapter class to self register with a source highlighter name using register_for
- load SyntaxHighlighter adapters lazily (except for highlight.js and html-pipeline)
- add :syntax_highlighters and :syntax_highlighter_factory options to API to allow syntax highlighter resolution to be customized
- instantiate SyntaxHighlighter adapter once header is finalized if source-highlighter attribute is set on document and basebackend is html
- provide SyntaxHighlighter factory modules for registering syntax highlighter adapters (default, custom, and default proxy)
- allow SyntaxHighlighter adapters to contribute docinfo at :head and :footer slots in HTML output document
- move retrieval and writing of stylesheets for syntax highlighters to SyntaxHighlighter adapters
- wire methods in Stylesheets class that pertain to syntax highlighting to SyntaxHighlighter adapters
- remove hard-coded styles in Pygments output
- update default stylesheets to support Pygments styles and drop CSS workarounds
- don't fail if value of pygments-style attribute is not recognized; instead fallback to default style
- don't remove nested pre tags in HTML produced by Pygments when linenums are enabled
- update default stylesheet to avoid styling nested pre tags
- rename pygments table class to pygments-table
- change pygments base CSS selector from .listingblock .pygments to pre.pygments
- allow color for generic text, line numbers, and line number border to inherit from Pygments style
- align stylesheet for default CodeRay style with other syntax highlighters
- set default background color for prettify using a selector with the lowest precedence
- update and add tests
- add tests for the Pygments integration
- add pygments.rb dependency and enable Pygments integration tests if the environment variable PYGMENTS=true is set
- move syntax highlighter tests to dedicated test file
Diffstat (limited to 'test/lists_test.rb')
| -rw-r--r-- | test/lists_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lists_test.rb b/test/lists_test.rb index 8c2d3e53..c1f798b0 100644 --- a/test/lists_test.rb +++ b/test/lists_test.rb @@ -4405,9 +4405,9 @@ puts doc.convert # <2> assert_xpath '(//programlisting/following-sibling::calloutlist/callout)[2][@arearefs = "CO1-2 CO1-3"]', output, 1 end - test 'listing block with non-sequential callouts followed by adjacent callout list' do + test 'source block with non-sequential callouts followed by adjacent callout list' do input = <<-EOS -[source, ruby] +[source,ruby] ---- require 'asciidoctor' # <2> doc = Asciidoctor::Document.new('Hello, World!') # <3> |
