Skip to content

v4.1.0

Latest

Choose a tag to compare

@mientjan mientjan released this 15 Mar 21:03
· 2 commits to master since this release

New Features

  • onLinkPress prop — custom link press handler, falls back to Linking.openURL()
  • mergeStyle prop (default true) — deep-merge custom styles with defaults per key instead of replacing entire style objects
  • debugPrintTree prop — log the AST tree structure to console for debugging
  • maxTopLevelChildren + topLevelMaxExceededItem props — preview mode to limit rendered top-level children
  • allowedImageHandlers + defaultImageHandler props — validate image URL schemes before rendering
  • Image accessibilityaccessibilityLabel and accessible set from image alt text

Bug Fixes

  • Hardbreak renders as <Text>{'\n'}</Text> instead of <View> — fixes crash on Android when hardbreak is inside a Text node
  • Code block and fence rules trim trailing newline added by markdown-it parser
  • Ordered list respects the start attribute (e.g. 57. foo now renders as 57 instead of 1)

Internal

  • RenderFunction type extended with ...args: unknown[] rest parameter for backward-compatible extra arguments
  • New AstRendererOptions interface for renderer configuration
  • AstRenderer constructor accepts optional third options argument
  • 41 new unit tests (140 total across 17 suites)

Full Changelog: v4.0.0...v4.1.0