| Age | Commit message (Collapse) | Author |
|
compatible with Rouge 4.1 (PR #4407)
Co-authored-by: Dan Allen <dan.j.allen@gmail.com>
|
|
|
|
using rouge as source highlighter (PR #4133)
|
|
source highlighter (PR #4129)
|
|
numbering and trim space after number
|
|
|
|
|
|
|
|
* run tests on JRuby 9.1 and 9.2 for Windows in CI
* don't run Pygments tests on JRuby 9.1 for Windows
* exclude tests that use run_command on JRuby 9.1 for Windows
* ensure mtime of input file honors TZ environment variable on JRuby for Windows
|
|
source-highlighter=pygments
* allow pygments.rb 2.x to be used as alternative to pygments.rb 1.x and document this support
* use a single regular expression to rewrite the lineno spans independent of Pygments version
* run tests against pygments.rb 2.x in addition to pygments.rb 1.x
* update docs about Pygments timeout to be clear it only applies to pygments.rb 1.x
* update test description that checks for lineno spans
|
|
|
|
|
|
- also define windows? as static method for these cases
- don't match darwin when detecting Windows
|
|
remain consistent with output from 1.5.x (PR #3787)
|
|
code elements (PR #3762)
|
|
(highlight.js, prettify) into head (PR #3718)
|
|
value of start attribute (PR #3701)
|
|
API (PR #3713)
- define load, convert, load_file, convert_file as module methods (e.g., `def self.load`)
- avoids conflict between `Asciidoctor.load` and `Kernel.load` when calling `include Asciidoctor`
- add test that Rouge integration works in combination with `include Asciidoctor`
|
|
- check for correct environment variable
|
|
|
|
(PR #3463)
- move style tag for convert-time syntax highlighters into head
- invoke docinfo? :head method on syntax highlighter adapter after content has been converted
|
|
disabled (PR #3343)
|
|
* restore compatibility with Rouge >= 3.4
* eagerly instantiate lexer if not using find_fancy
* pass options to constructor of Rouge lexer instead of #lex method
* don't clobber cgi-style options on language when enabling start_inline option on the Rouge PHP lexer
* add tests for passing options to the Rouge lexer
* upgrade Rouge to 3.4.0 (for development); also test against Rouge 2.0.7 in CI
|
|
- coerce symbol arguments to register_for to strings
- fill in missing API doc for register_for and register methods in SyntaxHighlighter module
|
|
documented
|
|
language is not set on block (PR #3224)
|
|
highlightjs-languages attribute (PR #3159)
|
|
|
|
source lang is invalid (PR #3138)
|
|
- use chop instead of chomp to remove trailing newline from heredoc string
- document all uses of non-quoted squiggly heredoc to preserve indentation
- fix incorrect preparation of uniform indentation in list tests
- remove unnecessary uses of chomp
|
|
|
|
comment to source files (PR #3055)
- replace gsub! and sub! with gsub and sub, respectively
- add `frozen_string_literal: true` magic comment to all Ruby source files
- see https://www.mikeperham.com/2018/02/28/ruby-optimization-with-one-magic-comment/
|
|
|
|
|
|
- add SyntaxHighlighter adapter implementation for Rouge
- support CGI options attached to language (e.g., "console?prompt=$ ")
- change CSS class of line numbering table for Pygments and Rouge to linenotable
- reuse styles from default stylesheet to layout the line number column
- remove nested pre wrapper in Pygments output when line numbering is enabled and linenums mode is inline
- ensure syntax highlighter library is loaded when looking up base style
- add the rouge gem as a development dependency
|
|
* use squiggly heredoc in syntax highlighter tests to make them more readable
* use squiggly heredoc to define CLI banner
|
|
highlighter is pygments
|
|
- 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
|