Skip to content

fix: skip invalid code block metadata without key-value pairs#561

Merged
satnaing merged 1 commit into
satnaing:mainfrom
sarrietav-dev:patch-1
Jul 19, 2025
Merged

fix: skip invalid code block metadata without key-value pairs#561
satnaing merged 1 commit into
satnaing:mainfrom
sarrietav-dev:patch-1

Conversation

@sarrietav-dev

Copy link
Copy Markdown
Contributor

Description

This ensures compatibility with transformers like transformerMetaHighlight, which may include metadata without key-value formatting.

Previously, metadata entries without an = would cause [key, value] to be undefined, potentially introducing invalid entries into the map. We now skip such entries to ensure only valid key-value pairs are parsed.

Types of changes

  • [X ] Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Documentation Update (if none of the other choices apply)
  • Others (any other types not listed above)

Checklist

  • I have read the Contributing Guide
  • I have added the necessary documentation (if appropriate)
  • Breaking Change (fix or feature that would cause existing functionality to not work as expected)

Further comments

Related Issue

This ensures compatibility with transformers like `transformerMetaHighlight`, which may include metadata without key-value formatting.

Previously, metadata entries without an = would cause [key, value] to be undefined, potentially introducing invalid entries into the map. We now skip such entries to ensure only valid key-value pairs are parsed.
@satnaing

Copy link
Copy Markdown
Owner

Ah, missed that check.
Thanks!

@satnaing
satnaing merged commit c5a34c7 into satnaing:main Jul 19, 2025
1 check passed
jxgla pushed a commit to jxgla/astro-paper that referenced this pull request Mar 10, 2026
…ng#561)

This ensures compatibility with transformers like `transformerMetaHighlight`, which may include metadata without key-value formatting.

Previously, metadata entries without an = would cause [key, value] to be undefined, potentially introducing invalid entries into the map. We now skip such entries to ensure only valid key-value pairs are parsed.
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