fix(deps): update dependency markdown-to-jsx to v8 #250
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR contains the following updates:
^7.1.2->^8.0.0Release Notes
quantizor/markdown-to-jsx (markdown-to-jsx)
v8.0.0Compare Source
Major Changes
450d2bb: Addedastoption to compiler to expose the parsed AST directly. Whenast: true, the compiler returns the AST structure (ASTNode[]) instead of rendered JSX.Breaking Changes:
ParserResulthas been renamed toASTNodefor clarity. If you were accessing this type directly (e.g., via module augmentation or type manipulation), you'll need to update references fromMarkdownToJSX.ParserResulttoMarkdownToJSX.ASTNode.First time the AST is accessible to users! This enables:
Usage:
The AST format is
MarkdownToJSX.ASTNode[]. When footnotes are present, the returned value will be an object withastandfootnotesproperties instead of just the AST array.3fa0c22: Refactored inline formatting parsing to eliminate ReDoS vulnerabilities and improve performance. The previous regex-based approach was susceptible to exponential backtracking on certain inputs and had several edge case bugs with nested formatting, escaped characters, and formatting inside links. The new implementation uses a custom iterative scanner that runs in O(n) time and is immune to ReDoS attacks.This also consolidates multiple formatting rule types into a single unified rule with boolean flags, reducing code duplication and bundle size. Performance has improved measurably on simple markdown strings:
Breaking Changes:
The following
RuleTypeenum values have been removed and consolidated into a singleRuleType.textFormatted:RuleType.textBoldedRuleType.textEmphasizedRuleType.textMarkedRuleType.textStrikethroughedIf you're using these rule types directly (e.g., for custom AST processing or overrides), you'll need to update your code to check for
RuleType.textFormattedinstead and inspect the node's boolean flags (bold,italic,marked,strikethrough) to determine which formatting is applied.Minor Changes
a421067: fix: overhaul HTML block parsing to eliminate exponential backtrackingReplaced the complex nested regex
HTML_BLOCK_ELEMENT_Rwith an efficient iterative depth-counting algorithm that maintains O(n) complexity. The new implementation uses stateful regex matching withlastIndexto avoid exponential backtracking on nested HTML elements while preserving all existing functionality.Performance improvements:
Patch Changes
e6b1e14: Fix renderer crash on extremely deeply nested markdown contentPreviously, rendering markdown with extremely deeply nested content (e.g., thousands of nested bold markers like
****************...text...****************) would cause a stack overflow crash. The renderer now gracefully handles such edge cases by falling back to plain text rendering instead of crashing.Technical details:
This fix ensures stability even with adversarial or malformed inputs while having no impact on normal markdown documents.
fe95c02: Remove unnecessary wrapper when footnotes are present.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) in timezone Asia/Tokyo.
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.