https://github.com/mdigger/goldmark-lang-typographer
Typographer allows you to select the language typographic substitutions for Goldmark Typographer.
https://github.com/mdigger/goldmark-lang-typographer
golang goldmark goldmark-extension markdown quotation-marks typograph typographer
Last synced: 4 months ago
JSON representation
Typographer allows you to select the language typographic substitutions for Goldmark Typographer.
- Host: GitHub
- URL: https://github.com/mdigger/goldmark-lang-typographer
- Owner: mdigger
- License: mit
- Created: 2021-06-13T21:42:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-23T06:37:22.000Z (over 3 years ago)
- Last Synced: 2024-06-20T05:26:03.674Z (almost 2 years ago)
- Topics: golang, goldmark, goldmark-extension, markdown, quotation-marks, typograph, typographer
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Goldmark Typographer Language Extension
[](https://pkg.go.dev/github.com/mdigger/goldmark-lang-typographer)
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.
```golang
import typographer "github.com/mdigger/goldmark-lang-typographer"
markdown := goldmark.New(
goldmark.WithExtensions(
typographer.New("ru"),
),
)
```
## Quotation marks substitution
Quotes substitutions based on [Wikipedia](https://en.wikipedia.org/wiki/Quotation_mark).
If the substitutions for this language are not specified, the library tries to
use substitutions for the base language or default.
| Code | Lang | Double | Single | Dash |
|-----------|----------------------------|:------:|:------:|:----:|
| `af` | Afrikaans | | | |
| `sq` | Albanian | `„“` | | |
| `am` | Amharic | `«»` | `‹›` | |
| `ar` | Arabic | `«»` | | |
| `hy` | Armenian | `«»` | | |
| `az` | Azerbaijani | `«»` | | |
| `eu` | Basque | `«»` | | |
| `be` | Belarusian | `«»` | | `--` |
| `bs` | Bosnian | `””` | `’’` | |
| `bg` | Bulgarian | `„“` | `’’` | |
| `ca` | Catalan | `«»` | | |
| `zh-Hans` | Chinese, simplified | | | |
| `hr` | Croatian | `„”` | | |
| `cs` | Czech | `„“` | `‚‘` | |
| `da` | Danish | `»«` | `›‹` | |
| `nl` | Dutch | | | |
| `en` | English | | | |
| `en-GB` | English, UK | | | |
| `en-US` | English, US | | | |
| `en-CA` | English, Canada | | | |
| `eo` | Esperanto | | | |
| `et` | Estonian | `„“` | | |
| `fil` | Filipino | | | |
| `fi` | Finnish | `””` | `’’` | |
| `fr` | French | `« »` | `‹ ›` | |
| `fr-CH` | French, Swiss | `«»` | `‹›` | |
| `gl` | Galician | `«»` | | |
| `ka` | Georgian | `„“` | | |
| `de` | German | `„“` | `‚‘` | |
| `de-CH` | German, Swiss | `«»` | `‹›` | |
| `el` | Greek | `«»` | | |
| `he` | Hebrew | `””` | `’’` | |
| `hi` | Hindi | | | |
| `hu` | Hungarian | `„”` | `’’` | |
| `is` | Icelandic | `„“` | `‚‘` | |
| `io` | Ido | `«»` | | |
| `id` | Indonesian | | | |
| `ia` | Interlingua | | | |
| `ga` | Irish | | | |
| `it` | Italian | `«»` | | |
| `it-CH` | Italian, Swiss | `«»` | `‹›` | |
| `kk` | Kazakh | `«»` | | |
| `km` | Khmer | `«»` | | |
| `ko` | Korean, South Korea | | | |
| `lo` | Lao | | | |
| `lv` | Latvian | | | |
| `lt` | Lithuanian | `„“` | `‚‘` | |
| `mk` | Macedonian | `„“` | `’‘` | |
| `mt` | Maltese | | | |
| `mn-Cyrl` | Mongolian, Cyrillic script | `«»` | | |
| `no` | Norwegian | `«»` | | |
| `oc` | Occitan | `«»` | | |
| `ps` | Pashto | `«»` | | |
| `fa` | Persian | `«»` | | |
| `pl` | Polish | `„”` | | |
| `pt-BR` | Portuguese, Brazil | | | |
| `pt-PL` | Portuguese, Portugal | `«»` | | |
| `ro` | Romanian | `„”` | | |
| `rm` | Romansh | `«»` | `‹›` | |
| `ru` | Russian | `«»` | | `--` |
| `sr` | Serbian | `„”` | `’’` | |
| `gd` | Scottish Gaelic | | | |
| `sk` | Slovak | `„“` | `‚‘` | |
| `sl` | Slovene | `„“` | `‚‘` | |
| `wen` | Sorbian | `„“` | `‚‘` | |
| `es` | Spanish | `«»` | | |
| `sv` | Swedish | `””` | `’’` | |
| `ta` | Tamil | | | |
| `ti` | Tigrinya | `«»` | `‹›` | |
| `th` | Thai | | | |
| `tr` | Turkish | | | |
| `uk` | Ukrainian | `«»` | | `--` |
| `ur` | Urdu | | | |
| `ug` | Uyghur | `«»` | `‹›` | |
| `uz` | Uzbek | `«»` | `‚‘` | |
| `vi` | Vietnamese | | | |
| `cy` | Welsh | | | |