Skip to content

feat: add superscript and subscript markdown spans#274

Open
hryhoriiK97 wants to merge 1 commit intomainfrom
feat/superscript-subscript-spans
Open

feat: add superscript and subscript markdown spans#274
hryhoriiK97 wants to merge 1 commit intomainfrom
feat/superscript-subscript-spans

Conversation

@hryhoriiK97
Copy link
Copy Markdown
Collaborator

@hryhoriiK97 hryhoriiK97 commented Apr 28, 2026

What/Why?

Fixes: #214

Adds opt-in superscript and subscript markdown support across the library.

This introduces ^text^ rendering as superscript and text rendering as subscript, backed by new md4cFlags.superscript and md4cFlags.subscript options. Subscript is opt-in to avoid breaking existing strikethrough behavior: when enabled, single tildes render as subscript and double tildes continue to render as strikethrough.

The change updates parsing, native/web rendering, WASM output, markdown serialization, copy-as-markdown behavior, docs, and examples so the new spans work consistently across platforms.

Testing

Screenshots

iOS Android

PR Checklist

  • Code compiles and runs on iOS
  • Code compiles and runs on Android
  • Updated documentation/README if applicable
  • Ran example app to verify changes

@hryhoriiK97 hryhoriiK97 marked this pull request as ready for review April 28, 2026 14:26
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.

Feature request: Support subscript and superscript

1 participant