💾 Archived View for gemi.dev › gemini-mailing-list › 000366.gmi captured on 2024-08-19 at 00:24:51. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-12-28)

-=-=-=-=-=-=-

Escaping Gemtext

1. Paper (paper (a) tilde.institute)

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

Link to individual message.

2. Sandra Snan (sandra.snan (a) idiomdrottning.org)

If you go to four spaces you'll become compatible with markdown ? not
necessarily worth it! Don't shoot the messenger on this one ?

Paper <paper at tilde.institute> writes:

> 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

Link to individual message.

---

Previous Thread: When thinking about feed formats, consider non-blog uses, too

Next Thread: [ANN] Draft for kind-of a Gemini Fediverse.