Escaping Gemtext

Paper paper at tilde.institute
Wed Sep 9 21:02:14 BST 2020


I am building a feed reader, so I am outputting plain text which can
contain some gemtext markup. I want to print it, but the client
shouldn't consider it a gemini markup. I could return "text/plain", but
I need some gemini formatting in the same page. After some discussion on
IRC yesterday, we found three approaches:

1. putting preformatting toggle lines before and after the user input
```
user input
```
- 10 more characters for each line (6 normal characters + 2x\r + 2x\n)
- if user inputs ```, all content under it will have preformatting toggle
  reversed
+ supported in all clients

2. putting a single space in front of the user input
 user input
+ only 1 line
+ supported in all clients
- shifts the entire user input one character to the right

3. putting a single unicode invisible space in front of the user input
‎user input
+ doesn't change the horizontal position of the text
- I am not sure what clients without support for outputting UTF-8 text
  will do with it

For now, I think the second option is best for me, am I missing some
options?

Paper


More information about the Gemini mailing list