class Kramdown::Parser::MarkdownLint
modified parser class - see comment above
Constants
- FENCED_CODEBLOCK_MATCH
-
GFM fenced code blocks, extended to allow spaces in the info string (e.g. “‘c hlines=2). The GFM regex restricts the info string to a single non-whitespace token, which causes kramdown to miss blocks whose info string contains a space, leading to false positives inside them. Capture groups match GFM’s: 1=fence, 2=fence-char, 3=full-info, 4=first-word, 5=content.
- PARAGRAPH_END
-
End paragraphs when a fenced code block starts, matching GFM behavior. Without this, fenced code blocks without a preceding blank line are swallowed into the paragraph.
Public Class Methods
Source
# File lib/mdl/kramdown_parser.rb, line 10 def initialize(source, options) super i = @block_parsers.index(:codeblock_fenced) @block_parsers.delete(:codeblock_fenced) @block_parsers.insert(i, :codeblock_fenced_gfm) end
Calls superclass method