mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-27 02:56:18 -04:00
7266ac4cbd
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 |
||
---|---|---|
.. | ||
css | ||
dom | ||
gemini | ||
html | ||
libdom | ||
plain | ||
docdata.c | ||
docdata.h | ||
document.cpp | ||
document.h | ||
format.c | ||
format.h | ||
forms.c | ||
forms.h | ||
Makefile | ||
meson.build | ||
options.c | ||
options.h | ||
refresh.c | ||
refresh.h | ||
renderer.cpp | ||
renderer.h | ||
view.h |