davidmerfield / Typeset

An HTML pre-proces­sor for web ty­pog­ra­phy
https://typeset.lllllllllllllllll.com/
Creative Commons Zero v1.0 Universal
2.65k stars 54 forks source link

language option #25

Open alexisargyris opened 9 years ago

alexisargyris commented 9 years ago

Is there a way to specify the language in the case of processing HTML fragments?

davidmerfield commented 9 years ago

Not yet, but there will be. This is especially needed for the soft hyphen insertion.

kirill-tsurkan commented 7 years ago

Also, in Russian we use «» quotation marks. Would be nice to see language specific settings.

oscarotero commented 4 years ago

Yes, please. Or at least a way to configure each feature manually. For example:

const options = {
    // https://en.wikipedia.org/wiki/Quotation_mark
    quotes: {
        primary: ['«', '»'],
        secondary: ['“', '”']
    },
    // https://en.wikipedia.org/wiki/Dash
    punctuation: {
        '--': '—',
    }
};

let output = typeset(html, options);