Class: Markdown::Merge::Cleanse::CondensedLinkRefs::CondensedDefinitionsGrammar Private
- Inherits:
-
Parslet::Parser
- Object
- Parslet::Parser
- Markdown::Merge::Cleanse::CondensedLinkRefs::CondensedDefinitionsGrammar
- Defined in:
- lib/markdown/merge/cleanse/condensed_link_refs.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Grammar for parsing multiple condensed link reference definitions.
This grammar handles the specific bug pattern where link definitions are concatenated without newlines or whitespace between them.
Key insight: A bare URL ends at any character that's not valid in a URL.
The [ character that starts the next definition is NOT valid in a bare URL,
so we can use it as the delimiter.
This PEG grammar is linear-time and cannot have polynomial backtracking, eliminating ReDoS vulnerabilities.