@uyum/markdown-it-translit
v1.2.1
Published
markdown-it plugin for display assyriology-style transliteration text
Downloads
21
Maintainers
Readme
Asscyriology Transliteration
Install
yarn add @uyum/markdown-it-translitUse
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.
| ascii | unicode | | ----- | ------- | | c | š | | sz | š | | s, | ṣ | | t, | ṭ | | t_ | ṯ | | j | ŋ | | g~ | g̃ | | h | ḫ | | h, | ḥ | | a^ | â | | a^ | â | | i^ | î | | u^ | û | | o^ | ô | | e^ | ê | | a~ | ā | | i~ | ī | | u~ | ū | | o~ | ō | | ' | ʿ | | ` | ʾ |
Licence
MIT
