How jeziellago/compose-markdown works
Compose Markdown is an Android library that exposes Markdown as a Jetpack Compose composable while rendering through a TextView-based Markwon pipeline. The main flow is caller content → MarkdownText → MarkdownRender and its configured extensions → CustomTextView display and interaction. The README also documents tables, task lists, HTML, images/GIFs, linkification, highlighting, selectable text, and block-level accessibility. Relationships reflect the supplied source excerpts and README; unsampled modules are included where their paths and capabilities are documented, but their internal wiring is not inferred.
Main entry points: MarkdownRender.kt Markwon setup · MarkdownText.kt MarkdownText · SyntaxHighlightPlugin.kt Highlight plugin · CustomTextView.kt Custom TextView
Components 14
Compose API
- MarkdownText
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/MarkdownText.kt - Auto-size config
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/AutoSizeConfig.kt - Text appearance
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/TextAppearanceExt.kt
Markdown Rendering
- Markwon setup
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/MarkdownRender.kt - Core Markdown
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/core/MardownCorePlugin.kt - Images and GIFs
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/image/ImagesPlugin.kt - Highlight plugin
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/syntaxhighlight/SyntaxHighlightPlugin.kt - Highlight extension
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/syntaxhighlight/SyntaxHighlightExtension.kt - Highlight delimiters
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/syntaxhighlight/SyntaxHighlightDelimiterProcessor.kt - Highlight node
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/syntaxhighlight/SyntaxHighlight.kt - Strikethrough renderer
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/syntaxhighlight/StrikethroughNodeRenderer.kt
Display and Interaction
- Custom TextView
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/CustomTextView.kt
Other components
- Compose caller
- Coil image loader
Connections 14
- Compose caller → MarkdownText: provides content
README.md - MarkdownText → Markwon setup: creates renderer
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/MarkdownText.kt - MarkdownText → Custom TextView: creates and updates
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/MarkdownText.kt - MarkdownText → Auto-size config: applies config
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/MarkdownText.kt - Markwon setup → Core Markdown: registers plugin
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/MarkdownRender.kt - Markwon setup → Images and GIFs: registers plugin
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/MarkdownRender.kt - Markwon setup → Highlight plugin: registers plugin
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/MarkdownRender.kt - Images and GIFs → Coil image loader: loads images
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/image/ImagesPlugin.kt - Highlight plugin → Highlight extension: registers extension
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/syntaxhighlight/SyntaxHighlightPlugin.kt - Highlight plugin → Highlight node: renders node
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/syntaxhighlight/SyntaxHighlightPlugin.kt - Highlight extension → Highlight delimiters: configures parser
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/syntaxhighlight/SyntaxHighlightExtension.kt - Highlight delimiters → Highlight node: creates node
markdowntext/src/main/java/dev/jeziellago/compose/markdowntext/plugins/syntaxhighlight/SyntaxHighlightDelimiterProcessor.kt - Markwon setup → Custom TextView: sets rendered text
- Custom TextView → Coil image loader: displays remote media