1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00
Commit Graph

11 Commits

Author SHA1 Message Date
hedy
7266ac4cbd
[gemini] Use paragraph tags on gemtext empty lines
This patch makes paragraphs separated by an empty new line appear after
an empty new line when rendered in elinks.

Previously, for a gemtext source that looks like this:

    First para
    Second line

    Second para

It renders like this:

    First para
    Second line
    Second para

After this patch, they now render like this:

    First para
    Second line

    Second para

Unfortunately this also adds a </p> to the start of the HTML, as well as
a <p> at the end, both redundant; but since the HTML is parsed and
rendered later on, it does not seem to alter how the document would
look.

    </p><p> First para <br> Second line </p><p> Second para </p><p>

I could possibly add a `first_paragraph` variable and a `i !=
buffer->length` check to remove the first </p> and last <p> in the HTML,
making the HTML source "prettier". But I don't believe that would be too
beneficial, considering the performance tradeoff in executing these two
extra checks for each empty new line encountered.

For testing please see: gemini://hedy.tilde.cafe/tmp/paragraphs.gmi
2023-09-28 15:48:59 +08:00
Witold Filipczyk
e0a125f112 [gmi] Add a new line after the first line of "preformatted" text. Refs #265 2023-09-12 10:23:26 +02:00
Witold Filipczyk
d783cf4add [string] string_replace -> el_string_replace 2023-07-01 19:40:24 +02:00
Witold Filipczyk
3ff58b17e4 [gemini] Missing LIs. Refs #242 2023-06-27 16:06:58 +02:00
Witold Filipczyk
87f18b53a0 [string] Check for NULL 2022-01-04 16:40:28 +01:00
Witold Filipczyk
dc9b4bed04 [gemini] Changes to see labirynth 2021-07-03 14:34:16 +02:00
Witold Filipczyk
61247f6a32 [text/gemini] Do not expect space 2021-07-02 22:13:09 +02:00
Witold Filipczyk
623e0738df [gemini] strncmp for readability 2021-07-02 15:21:39 +02:00
Witold Filipczyk
2f1e2fc58b [gemini] add_html_to_string 2021-07-02 15:11:37 +02:00
Witold Filipczyk
40e2865705 [gemini] One link per line. Fix for links without descriptions. 2021-07-01 21:01:02 +02:00
Witold Filipczyk
5ed65c8733 [gemini] text/gemini 2021-07-01 20:18:29 +02:00