Skip to content

feat: support HTML line break tags - #700

Open
huytdps13400 wants to merge 1 commit into
software-mansion:mainfrom
huytdps13400:fix/52-html-br
Open

feat: support HTML line break tags#700
huytdps13400 wants to merge 1 commit into
software-mansion:mainfrom
huytdps13400:fix/52-html-br

Conversation

@huytdps13400

Copy link
Copy Markdown
Contributor

What/Why?

Support attribute-free HTML line break tags (<br>, <br/>, <br />, including case variants) in the shared Markdown parser.

The parser previously disabled all HTML tokenization, so these tags were emitted as literal text. This change keeps HTML blocks disabled, enables inline HTML tokenization, maps only supported br tokens to the existing LineBreak AST node, and appends every other inline HTML token as literal text. Tags with attributes and tags inside code spans remain literal.

This also covers br inside GFM table cells.

Closes #52.

Testing

  • RED/GREEN standalone C++ parser harness, including paragraph, table, unsupported HTML, and code-span cases
  • Full iOS EnrichedMarkdown XCTest suite on iPhone 17 Pro simulator
  • Android parser native build for armv7, arm64, x86, and x86_64
  • Android instrumentation-test APK compilation
  • Android unit tests and ktlint
  • C++ clang-format check
  • yarn lint
  • yarn typecheck
  • yarn test — 6/6 tests
  • yarn prepare

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
  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

@eszlamczyk eszlamczyk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @huytdps13400 we will have to investigate this feature further if this is the way we are 100% sure we want to take, I'll circle to it back in the future

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.

Add support for HTML <br> tags

2 participants