Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: reference image markdown when there is not reference. #525

Closed
wants to merge 1 commit into from

Conversation

anhydrous99
Copy link

My attempt at fixing #524. This adds a fallback for when an image reference markdown is missing it's reference. As with links, the markdown is displayed.

This also adds two tests for this scenario, for images and links.

return {
_alt: capture[1] || undefined,
_fallbackContent: parse(
capture[0].replace(SQUARE_BRACKETS_R, '\\$1'),

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This does not escape backslash characters in the input.
@quantizor
Copy link
Owner

Simpler fix in #554, thank you for reporting!

@quantizor quantizor closed this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants