This simple library for Kodi converts basic Markdown to valid Kodi formatted text (See here).
The basic Markdown syntax is supported. The aim is to eventually also support the majority of the GitHub flavoured markdown. A cheatsheet can be found at GitHub.
The following table has an overview of the supported syntax:
Description | Markdown | Kodi formatted text |
---|---|---|
Heading 1 | # |
[B][LIGHT][UPPERCASE] |
Heading 2 | ## |
[B][LIGHT][CAPITALIZE] |
Heading 3 | ### |
[LIGHT][CAPITALIZE] |
Heading 4 | #### |
[LIGHT][CAPITALIZE] |
Bold | **bold** or __bold__ |
[B]bold[/B] |
Italic | *bold* or _bold_ |
[I]bold[/I] |
Link | [text](url) |
[COLOR blue]text[/COLOR] |
Image | ![text](url) |
[COLOR yellow][text][/COLOR] |
Ordered and unordered lists are supported. However, ordered lists need to have proper numbering. Output for numbered lists is:
1. Ordered List Level 1 | 1. Ordered List Level 1
2. Ordered List Level 1 | 2. Ordered List Level 1
1. Ordered List Level 2 | 1. Ordered List Level 2
2. Ordered List Level 2 | 2. Ordered List Level 2
For unordered lists, the chars *
, +
and -
can be used. The Kodi formatted output will be:
- Unordered Level 1 | • Ordered List Level 1
+ Unordered Level 1 | • Ordered List Level 1
* Unordered Level 1 | • Ordered List Level 1
+ Unordered Level 2 | - Ordered List Level 2
- Unordered List Level 2 | - Ordered List Level 2
* Unordered List Level 2 | - Ordered List Level 2
List styles can be combined:
- Unordered Level 1 | • Ordered List Level 1
- Unordered Level 1 | • Ordered List Level 1
1. Ordered List Level 2 | 1. Ordered List Level 2
2. Ordered List Level 2 | 2. Ordered List Level 2
Description | Remark |
---|---|
Tables | Will be removed completely. |
Images | Replaced with the alt text: [alt text](actual url) |
Links | Will be replaced with the their corresponding text. |