1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 04:25:08 +00:00
Commit graph

2 commits

Author SHA1 Message Date
Nico Weber
08585bc7e9 LibGemini: Improve rendering of <pre> blocks
For

    ```foo
    asdf
    jkl;
    ```bar

we would previously generate

    <pre>foo
    f
    ;
    </pre>
    ```bar

Now we generate

    <pre>
    asdf
    jkl;
    </pre>

* no longer cut off the first 3 characters on most lines.
* don't include the closing ``` line in the output. in addition to
  omitting the '```', this also honors "Any text following the leading
  "```" of a preformat toggle line which toggles preformatted mode off
  MUST be ignored by clients." from the spec
* ignore the alt text after the toggle-on text. the spec leaves it to
  the client what to do with that alt text, but it tends to be metadata,
  and omitting it is simplest for the implementation, so do that.

Improves ascii art on many gemini pages, e.g. gemini://carcosa.net/
2020-10-06 20:29:11 +02:00
AnotherTest
013cb76d77 LibGemini: Implement rendering text/gemini documents to HTML
This also sets Content-Type to whatever 'meta' contains on success, to
allow the browser to pick up what the document contains.
2020-05-17 16:35:42 +02:00