pnfo / tipitaka.app

New Chatta Sangayana Tipitaka web app and software
14 stars 4 forks source link

wrong conversion from roman to myanmar for ddho #19

Closed pndaza closed 3 years ago

pndaza commented 3 years ago

roman input: ddho Expected output = ဒ္ဓေါ current output = ဒ္ဓါ

https://github.com/pnfo/tipitaka.app/blob/f8db19465d80ebf2d57250efff8860635a16b2e6/scripts/pali-script.mjs#L203

current code: return text.replace(/(ဒ္ဓ|ဒွ)(ေ?)\u102c/g, "$1\u102b"); correct code: return text.replace(/(ဒ္ဓ|ဒွ)(ေ?)\u102c/g, "$1$2\u102b");

it is actually my mistake. ( missed to reference group 2)

pathnirvana commented 3 years ago

Many thanks @pndaza Bhante. I have corrected the issue. ba054159dbe8050ad61716869b89c0a4d3a63f62 will update the website soon.