1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-29 01:45:34 +00:00
Commit Graph

4796 Commits

Author SHA1 Message Date
Witold Filipczyk
42abf0b058 [spidermonkey] clang compilation fixes 2023-09-28 13:27:31 +02:00
Witold Filipczyk
6487a287cf [document] Slightly better handling of string 2023-09-28 12:04:57 +02:00
Witold Filipczyk
98e72e99f3 [document] text as struct string 2023-09-28 11:54:46 +02:00
Witold Filipczyk
e80a2f7014 Merge branch 'master' into router 2023-09-28 10:40:45 +02:00
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
5483782949 [session] load_common as separate function
Call it instead of display_timer in delayed_reload
2023-09-27 17:14:01 +02:00
Witold Filipczyk
5175ecd2b7 [libcss] gray75 as default color for text 2023-09-27 10:47:04 +02:00
Witold Filipczyk
a645856fac [libcss] color must be set
Otherwise valgrind shows uninitialized value.
2023-09-26 19:44:34 +02:00
Witold Filipczyk
c3c80cb952 [libdom] cast 2023-09-26 19:38:08 +02:00
Witold Filipczyk
5e5d7f702a [options] Moved was_xml_parsed below framename
Also call display_timer. For framesets
2023-09-26 16:58:13 +02:00
Witold Filipczyk
637bcb725c [quickjs] location 2023-09-25 14:35:53 +02:00
Witold Filipczyk
c9359669bd [spidermonkey] getLocation
Both:
location = url;
location.href = url;
should work.
2023-09-25 13:46:18 +02:00
Witold Filipczyk
4375984708 [js] Distinguish between document.write(ln) and other modifications
Reparse document only for document.write(ln).
2023-09-25 10:52:19 +02:00
Witold Filipczyk
15da44d9ea [libdom] reparse document, when it was modified by js 2023-09-24 17:56:58 +02:00
Witold Filipczyk
78543c55ee [table] skip_script 2023-09-24 17:56:06 +02:00
Witold Filipczyk
81b89946e6 [cookies] dl=0 ok 2023-09-24 10:27:29 +02:00
Witold Filipczyk
773ac97e1b [libdom] For parsed document separate function: dump_xhtml 2023-09-23 19:28:28 +02:00
Witold Filipczyk
b3e77ef53e [js] document is already parsed. No need to check 2023-09-23 18:58:21 +02:00
Witold Filipczyk
1b9983c543 [mujs] element.value 2023-09-22 21:04:24 +02:00
Witold Filipczyk
a6a7345701 [quickjs] element.value 2023-09-22 20:54:24 +02:00
Witold Filipczyk
6ce64c1894 [spidermonkey] element.value 2023-09-22 20:40:19 +02:00
Witold Filipczyk
f461c86ce6 [document] Added body_onkeypress
It is silly, but I want some scripts to work.
2023-09-22 16:37:53 +02:00
Witold Filipczyk
9ca95e1ffe [js] ENTER has code 13 2023-09-21 19:35:52 +02:00
Witold Filipczyk
fb1c70564e [mujs] window.event 2023-09-21 19:06:52 +02:00
Witold Filipczyk
ced7b7b294 [quickjs] window.event 2023-09-21 17:59:47 +02:00
Witold Filipczyk
a9b8dca965 [spidermonkey] window.event 2023-09-21 17:38:56 +02:00
Witold Filipczyk
447aa41dc9 [js] placeholder for onkeypress 2023-09-21 09:30:50 +02:00
Witold Filipczyk
5dc2187450 [libdom] Do not rewrite < and > in scripts 2023-09-20 18:46:38 +02:00
Witold Filipczyk
b0127bec3b [js] unused variable 2023-09-19 21:02:44 +02:00
Witold Filipczyk
4d8de245ad [spidermonkey] element.style (setter) 2023-09-19 20:59:35 +02:00
Witold Filipczyk
b434875c52 [quickjs] element.style (setter) 2023-09-19 20:40:03 +02:00
Witold Filipczyk
6fb1360c01 [mujs] element.style (setter) 2023-09-19 20:19:21 +02:00
Witold Filipczyk
0b7caf4e82 [spidermonkey] element.style (getter) 2023-09-19 17:29:08 +02:00
Witold Filipczyk
b34d1b6b60 [quickjs] element.style (getter) 2023-09-19 16:48:16 +02:00
Witold Filipczyk
e2ea308100 [mujs] element.style (getter) 2023-09-19 16:04:39 +02:00
Witold Filipczyk
79bfb0bc4a [br] Shorter code 2023-09-14 17:57:56 +02:00
Witold Filipczyk
5fbfacbab6 [xhtml] Special case for BR. Refs #266
Rewrite is as <BR/> instead of <BR></BR>.
2023-09-14 17:40:27 +02:00
Witold Filipczyk
c603fe4058 [libdom] convert back < to &lt; and > to &gt; Refs #266 2023-09-13 21:38:40 +02:00
Witold Filipczyk
b8a1b1e01f [spidermonkey] init string () not {} 2023-09-12 18:21:49 +02:00
Witold Filipczyk
843af9e300 [c++] initialize string with () not {}. Refs #253 2023-09-12 18:01:19 +02:00
Witold Filipczyk
aca4e7e517 [mujs] Typo 2023-09-12 17:28:26 +02:00
Witold Filipczyk
929ff93cca [curl] Build fix 2023-09-12 16:56:36 +02:00
Witold Filipczyk
c3eae90ce9 [clang] Compilation fixes 2023-09-12 16:41:09 +02:00
Witold Filipczyk
7cf2be2db7 [spidermonkey] Declare str earlier 2023-09-12 15:41:42 +02:00
Witold Filipczyk
80e2b6b812 [quickjs] compilation fix 2023-09-12 15:39:26 +02:00
Witold Filipczyk
496bfcea60 [mujs] Compilation fix? Refs #253 2023-09-12 15:37:10 +02: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
e5ad52fc57 [gemini] Off by one? Refs #264 2023-09-12 09:58:59 +02:00
Witold Filipczyk
47c59125f4 [quickjs] element.blur() 2023-09-11 19:11:16 +02:00
Witold Filipczyk
dd66c07a8c [mujs] element.blur() 2023-09-11 19:07:51 +02:00