Module: Asciidoctor::Rx
- Defined in:
- lib/asciidoctor/rx.rb
Overview
A collection of regular expression constants used by the parser. (For speed, these are not defined in the Rx module, but rather directly in the Asciidoctor module).
NOTE The following pattern, which appears frequently, captures the contents between square brackets, ignoring escaped closing brackets (closing brackets prefixed with a backslash ‘' character)
Pattern: \[(|#{CC_ALL}*?[^\\])\]
Matches: [enclosed text] and [enclosed [text\]], not [enclosed text \\] or [\\] (as these require a trailing space)