Categorygithub.com/mdigger/goldmark-lang-typographer
modulepackage
1.0.0
Repository: https://github.com/mdigger/goldmark-lang-typographer.git
Documentation: pkg.go.dev

# README

Goldmark Typographer Language Extension

Go Reference

Package typographer allows you to select the language typographic substitutions for Goldmark Typographer.

This library is not a replacement of the standard Goldmark typography, and only expands its capabilities by adding quotation symbols for different languages.

import typographer "github.com/mdigger/goldmark-lang-typographer"

markdown := goldmark.New(
    goldmark.WithExtensions(
        typographer.New("ru"),
    ),
)

Quotation marks substitution

Quotes substitutions based on Wikipedia. If the substitutions for this language are not specified, the library tries to use substitutions for the base language or default.

CodeLangDoubleSingleDash
afAfrikaans
sqAlbanian„“
amAmharic«»‹›
arArabic«»
hyArmenian«»
azAzerbaijani«»
euBasque«»
beBelarusian«»--
bsBosnian””’’
bgBulgarian„“’’
caCatalan«»
zh-HansChinese, simplified
hrCroatian„”
csCzech„“‚‘
daDanish»«›‹
nlDutch
enEnglish
en-GBEnglish, UK
en-USEnglish, US
en-CAEnglish, Canada
eoEsperanto
etEstonian„“
filFilipino
fiFinnish””’’
frFrench« »‹ ›
fr-CHFrench, Swiss«»‹›
glGalician«»
kaGeorgian„“
deGerman„“‚‘
de-CHGerman, Swiss«»‹›
elGreek«»
heHebrew””’’
hiHindi
huHungarian„”’’
isIcelandic„“‚‘
ioIdo«»
idIndonesian
iaInterlingua
gaIrish
itItalian«»
it-CHItalian, Swiss«»‹›
kkKazakh«»
kmKhmer«»
koKorean, South Korea
loLao
lvLatvian
ltLithuanian„“‚‘
mkMacedonian„“’‘
mtMaltese
mn-CyrlMongolian, Cyrillic script«»
noNorwegian«»
ocOccitan«»
psPashto«»
faPersian«»
plPolish„”
pt-BRPortuguese, Brazil
pt-PLPortuguese, Portugal«»
roRomanian„”
rmRomansh«»‹›
ruRussian«»--
srSerbian„”’’
gdScottish Gaelic
skSlovak„“‚‘
slSlovene„“‚‘
wenSorbian„“‚‘
esSpanish«»
svSwedish””’’
taTamil
tiTigrinya«»‹›
thThai
trTurkish
ukUkrainian«»--
urUrdu
ugUyghur«»‹›
uzUzbek«»‚‘
viVietnamese
cyWelsh

# Functions

New returns a new goldmark.Extender that replaces punctuations with typographic entities for the specified language.
Options return an TypographerOption options for the TypographerParser.
Substitutions returns a substitutions of typographic characters for the specified language.