/
general_text.gmi
89 lines (51 loc) · 2.87 KB
/
general_text.gmi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# General text
Paragraphs are printed verbatim in gmnhg.
Single newlines (like in this multi-line paragraph) will get replaced by a space, as Gemini specification p. 5.4.1 recommends this for soft-wrapping text by clients.
Inline formatting bits (like this **bold** text, *emphasized* text, ~~strikethrough~~ text, `preformatted text`) are kept to make sure Gemini readers still have the stylistic context of your text.
## Blockquotes
Newlines in blockquote paragraphs, unlike usual paragraphs, aren't replaced with a space. This facilitates appending authorship information to the quote, or using blockquotes to write poems.
> "Never trouble another for what you can do yourself"
> — Thomas Jefferson, 3rd president of the US
> "Wow, writing comprehensive test suites is hard!"
> — Timur Demin, while writing this very test file
> "Somehow I know these two paragraphs will be broken into two separate
> blockquotes by gmnhg. I think my knowledge of that comes from being
> the author of this program."
> — also Timur Demin, in the process of writing this test file
## Code
gmnhg will use Gemtext preformatted blocks for that. Markdown alt-text for preformatted blocks is supported, and is used to render alt-text as specified by Gemini spec p. 5.4.3.
```go
package main
func main() {
println("gmnhg is awesome!")
}
```
Preformatted Markdown of course isn't rendered:
```
# I am a test Markdown document
I contain text in **bold**.
```
## Links
gmnhg supports links, images, and footnotes. Links are a very interesting topic on itself; see a separate document for those.
=> links.md separate document
## Lists
Definition lists, numbered and ordered lists are all supported in gmnhg. There's also a separate document displaying those.
=> lists.md separate document
## Tables
Markdown tables are supported in gmnhg, and are better displayed by a separate document.
=> tables.md separate document
## Headings
Gemini specification allows up to three heading levels, with an optional space after the last heading symbol, `#`. With Markdown, you get 6; gmnhg will simply print the relevant number of #-s, making the client up to parse more heading levels and keeping context of the source document.
Since clients like Lagrange treat the fourth and the rest of #-s as heading content, it's best to avoid using H4-H6 in Gemini-aware Markdown entirely. Headings from H3 to H6 are provided below so you can test how your client handles that.
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
## Misc
Inline HTML is currently stripped, but HTML contents remain on-screen. This may change in the future.
> There's currently a bug in gmnhg which prevents it from
> stripping HTML in certain scenarios. HTML is noticeably still present
> inside <span>blockquotes</span>.
=> https://github.com/tdemin/gmnhg/issues/6 bug in gmnhg
---
The Markdown horizontal line above is rendered as triple dashes.