Skip to content

Add Markpub content parser#9

Open
pfefferle wants to merge 8 commits intotrunkfrom
add/markpub-parser
Open

Add Markpub content parser#9
pfefferle wants to merge 8 commits intotrunkfrom
add/markpub-parser

Conversation

@pfefferle
Copy link
Copy Markdown
Member

Proposed changes:

  • Add Markpub parser (at.markpub.markdown) that walks Gutenberg blocks via parse_blocks() and converts each to GFM markdown.
  • Register Markpub as the default content parser via the atmosphere_content_parser filter.
  • Add tests for all supported block types and filter integration.

Stacked on #8. Merge that first.

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Verify ?atproto preview on a published post returns valid JSON with a content field containing at.markpub.markdown data.
  • Verify block content converts to markdown correctly (headings, links, images, lists, code blocks).
  • Verify classic editor content falls back to inline HTML-to-markdown conversion.
  • Verify atmosphere_content_parser filter with __return_null disables the content field.
  • Run npm run env-test — all tests pass.

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Add rich content support for standard.site documents using the Markpub format.

@pfefferle pfefferle added the enhancement New feature label Mar 23, 2026
@pfefferle pfefferle self-assigned this Mar 23, 2026
@github-actions github-actions bot added [Feature] Content Parser Content parser for AT Protocol [Tests] Includes Tests PR includes test changes labels Mar 23, 2026
@pfefferle pfefferle force-pushed the add/markpub-parser branch 3 times, most recently from f3d5710 to 71a30f5 Compare March 23, 2026 17:15
Base automatically changed from add/content-parser-interface to trunk March 23, 2026 17:34
@github-actions github-actions bot added the [Feature] Transformer AT Protocol record transformers label Mar 23, 2026
Ship a Markpub parser (at.markpub.markdown) as the default content
parser, registered via the atmosphere_content_parser filter.

- Add Markpub class that walks Gutenberg blocks via parse_blocks()
  and converts each to GFM markdown.
- Register Markpub as the default parser in Atmosphere::init().
- Add tests for all supported block types and filter integration.
- Use a separate counter for ordered lists so numbering stays
  sequential when empty items are skipped.
- Percent-encode parentheses in link URLs to prevent breaking
  markdown link syntax.
@pfefferle pfefferle force-pushed the add/markpub-parser branch from 6a2aa7d to 920dbea Compare March 23, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature [Feature] Content Parser Content parser for AT Protocol [Feature] Transformer AT Protocol record transformers [Tests] Includes Tests PR includes test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant