1.2.1 • Published 3 years ago

@uyum/markdown-it-translit v1.2.1

Weekly downloads
91
License
MIT
Repository
github
Last release
3 years ago

Build Status npm version MIT License

Asscyriology Transliteration

Install

yarn add @uyum/markdown-it-translit

Use

var md = require('markdown-it')()
            .use(require('@uyum/markdown-it-translit'),
            {    
                accentIndex: false,
                useSubSupUnicode: false,
                convertTypography: false,
            });
md.render('=={DIS}LUGAL.MES2==') 
//=><p><span class="sumero-transliteral"><sup>DIS</sup>LUGAL.MES<sub>2</sub></span></p>


md.render('=*{DIS}LUGAL.MES2*=') 
//=><p><span class="akkado-transliteral"><sup>DIS</sup>LUGAL.MES<sub>2</sub></span></p>

Options

accentIndex

if true, it will convert a2 to á, a3 to à.

useSubSupUnicode

if true, it will try to use Unicode superscripts and subscripts instead of <sup> and <sub>.

convertTypography

if true, it will convert according to the table below.

asciiunicode
cš
szš
s,
t,
t_
jŋ
g~
h
h,
a^â
a^â
i^î
u^û
o^ô
e^ê
a~ā
i~ī
u~ū
o~ō
'ʿ
` | ʾ

Licence

MIT