MarkdownParser
Kotlin Multiplatform Markdown parser with support for bold, underline, italics, and hyperlinks.
Install / Use
/learn @ralphpina/MarkdownParserREADME
MarkdownParser
This is a simple POC to parse a subset of markdown and render it in Android and iOS.
Supported Markdown Styles
This POC tries to handle the following markdown styles:
- bold:
**bold** - underline:
__underline__ - italic:
_italic_ - hyperlink:
[link text](http://google.com)
Shared
- MarkdownParser.kt: exposes a parse() method that returns the copy and a list of entities.
Android
- AndroidMarkdownRenderer.kt: exposes a couple of extension methods to add markdown to a
TextViewandButton.
iOS
-
TODO: we need to implement this, probably using NSAttributedString or UIFont. I need to explore this.
-
We welcome contributions :)
Example
Thus, the following copy:
val markdown = "Some text is **bold**. While some text is _italic_. Other is __underlined__. Lastly we have [link](http://google.com)."
Used like so in Android:
val textView = findViewById<TextView>(R.id.text_view)
val button = findViewById<Button>(R.id.button)
textView.renderMarkdown(markdown)
button.renderMarkdown(markdown)
Is rendered like so:

Related Skills
openhue
347.2kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
347.2kElevenLabs text-to-speech with mac-style say UX.
weather
347.2kGet current weather and forecasts via wttr.in or Open-Meteo
Better-Prompt
Publishable Prompt Engineering skill package that compiles a user request into a ready-to-use high-quality Prompt, with support for diagnosis, module injection, debugging, and evaluation.
