Skip to content

Improve safety of callout handling in EnhancedCodeBlockParser. - #455

Merged
Mpdreamz merged 1 commit into
mainfrom
fix/code-annotions-protection
Feb 10, 2025
Merged

Mpdreamz merged 1 commit into
mainfrom
fix/code-annotions-protection

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Feb 10, 2025 •

Copy link
Copy Markdown
Member

Adjusted logic to ensure stricter detection of classic callouts by checking for a closing angle bracket at the end of the span. Also updated regex generation in CallOutParser to use a timeout for better performance and stability.

This brings the full build of the reference branch in asciidocalypse back down to ~45s on my local laptop again (from 4 minutes prior).

Most of the remaining time is in the unoptomized RenderNavivation() subbing that out for something that is cached brings the total build further down to ~10s. Will save that work for another PR once the redesign kicks in!

Adjusted logic to ensure stricter detection of classic callouts by checking for a closing angle bracket at the end of the span. Also updated regex generation in CallOutParser to use a timeout for better performance and stability.
@Mpdreamz Mpdreamz added the fix label Feb 10, 2025
@Mpdreamz
Mpdreamz requested a review from reakaleek February 10, 2025 11:58

@reakaleek reakaleek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. 🚀

@Mpdreamz
Mpdreamz merged commit 413d380 into main Feb 10, 2025
@Mpdreamz
Mpdreamz deleted the fix/code-annotions-protection branch February 10, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants