Expand description
ยงAbout
Convert Markdown to Unicode:
Input | Result |
---|---|
*Emphasis* | ๐๐ฎ๐ฑ๐ฉ๐ข๐ด๐ช๐ด |
**Strong** | ๐๐ญ๐ซ๐จ๐ง๐ |
`Code` | ๐ฒ๐๐๐ |
~~Strike~~ | Sฬถtฬถrฬถiฬถkฬถeฬถ |
***Emphasis strong*** | ๐ฌ๐๐๐๐๐๐๐ ๐๐๐๐๐๐ |
***Emphasis* strong** | ๐ฌ๐๐๐๐๐๐๐ ๐ฌ๐ญ๐ซ๐จ๐ง๐ |
***Strong** emphasis* | ๐บ๐๐๐๐๐ ๐ฆ๐ฎ๐ฑ๐ฉ๐ข๐ด๐ช๐ด |
*`Emphasis code`* | โฐ๐๐ ๐ฝ๐ถ๐๐พ๐ ๐ธโด๐นโฏ |
**`Strong code`** | ๐ข๐ฝ๐ป๐ธ๐ท๐ฐ ๐ฌ๐ธ๐ญ๐ฎ |
***`Emphasis strong code`*** | โบโโโโโขโโข โขโฃโกโโโ โโโโ |
~~*Strike emphasis*~~ | ๐ฬถ๐ตฬถ๐ณฬถ๐ชฬถ๐ฌฬถ๐ฆฬถ ฬถ๐ฆฬถ๐ฎฬถ๐ฑฬถ๐ฉฬถ๐ขฬถ๐ดฬถ๐ชฬถ๐ดฬถ |
~~**Strike strong**~~ | ๐ฬถ๐ญฬถ๐ซฬถ๐ขฬถ๐คฬถ๐ฬถ ฬถ๐ฌฬถ๐ญฬถ๐ซฬถ๐จฬถ๐งฬถ๐ ฬถ |
~~***Strike emphasis strong***~~ | ๐บฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ |
~~`Strike code`~~ | ๐ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ ฬถ๐ฬถ๐ฬถ๐ฬถ๐ฬถ |
~~*`Strike emphasis code`*~~ | ๐๐ฑ๐ฏ๐ฆ๐จ๐ข ๐ข๐ช๐ญ๐ฅ๐๐ฐ๐ฆ๐ฐ ๐ ๐ฌ๐ก๐ข |
~~**`Strike strong code`**~~ | ๐พ๐๐๐๐๐ ๐๐๐๐๐๐ ๐๐๐๐ |
~~***`Strike emphasis strong code`***~~ | ๐๐ฅ๐ฃ๐๐๐ ๐๐๐ก๐๐๐ค๐๐ค ๐ค๐ฅ๐ฃ๐ ๐๐ ๐๐ ๐๐ |
Uses pulldown-cmark
and a modified version of its push_html
to do real Markdown parsing and
rendering.
As a result, it normalizes:
- Headings: Setext headings
- Unordered lists:
*
- Ordered lists: numbered,
.
- Rules:
---
- Tables
ยงNotes
-
This crate does not do syntax highlighting or terminal colors. For that, please check out
bat
andsyntect
. -
This crate outputs Unicode text using the Mathematical Alphanumeric Symbols and Enclosed Alphanumerics blocks, however your ability to see the effects depends on the specific applications (terminal, text editor, web browser, etc) youโre using and their configurations (fonts, etc).
-
This crate can be considered an improved version of the
markdown2unicode
crate but contains no copyrighted nor GPLv3 licensed code from its original upstream source (USBashkaโs markdown2unicode) and usespulldown-cmark
instead.
ยงExample
assert_eq!(
unidown::convert("\
Here is some *emphasis*, **strong**, ***strong emphasis***, ~~strike~~, \
and `code` text.\n\n\
"),
"Here is some ๐ฆ๐ฎ๐ฑ๐ฉ๐ข๐ด๐ช๐ด, ๐ฌ๐ญ๐ซ๐จ๐ง๐ , ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐, sฬถtฬถrฬถiฬถkฬถeฬถ, and ๐๐๐๐ text.\n\n",
);
Enumsยง
Functionsยง
- all
- All mode
- convert
- Convert Markdown to Unicode
- demo
- Demo mode
- push_
unicode - Iterate over an
Iterator
ofEvent
s, generate Unicode for eachEvent
, and push it to aString
. - write_
unicode_ fmt - Iterate over an
Iterator
ofEvent
s, generate Unicode for eachEvent
, and write it into Unicode-accepting buffer or stream. - write_
unicode_ io - Iterate over an
Iterator
ofEvent
s, generate Unicode for eachEvent
, and write it out to an I/O Stream.