https://github.com/nemunaire/goldmark-subscript
This goldmark parser extension adds support for subscript in markdown, implements the pandoc subscript extension
https://github.com/nemunaire/goldmark-subscript
Last synced: 3 months ago
JSON representation
This goldmark parser extension adds support for subscript in markdown, implements the pandoc subscript extension
- Host: GitHub
- URL: https://github.com/nemunaire/goldmark-subscript
- Owner: nemunaire
- License: mit
- Created: 2024-09-01T19:03:06.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-09-01T19:07:15.000Z (9 months ago)
- Last Synced: 2025-01-19T15:51:32.858Z (4 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goldmark-subscript
[GoldMark](https://github.com/yuin/goldmark/) subscript extension.
This implements the [`subscript`](https://pandoc.org/MANUAL.html#extension-superscript-subscript) of pandoc.
```markdown
H~2~O is a liquid. 2^10^ is 1024.
``````html
H2O is a liquid. 2^10^ is 1024.
``````go
var md = goldmark.New(subscript.Enable)
var source = []byte("H~2~O is a liquid. 2^10^ is 1024.")
err := md.Convert(source, os.Stdout)
if err != nil {
log.Fatal(err)
}
```