Introduction
Introduction Statistics Contact Development Disclaimer Help
with the -i and -a option highlight links in ANSI reverse - webdump - HTML to p…
git clone git://git.codemadness.org/webdump
Log
Files
Refs
README
LICENSE
---
commit bc435d97f57537adbce2b1ddac9f0744a57279ae
parent f4f2dc53e082fcbf627d567810c399c306009ea0
Author: Hiltjo Posthuma <[email protected]>
Date: Wed, 13 Sep 2023 20:38:27 +0200
with the -i and -a option highlight links in ANSI reverse
Diffstat:
M webdump.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/webdump.c b/webdump.c
@@ -1661,12 +1661,23 @@ endnode(struct node *cur)
cur->tag.name, ishidden, linkcount);
}
+ if (showrefinline || showurlinline) {
+ hflush();
+ startmarkup(MarkupReverse);
+ }
+
if (showrefinline)
hprintf("[%zu]", ref->linknr);
- if (showurlinline)
- hprintf(" [%s: %s]", ref->type, ref->url);
- if (showrefinline || showurlinline)
+ if (showurlinline) {
+ if (!tagcmp("link", ref->type))
+ hprintf("[%s]", ref->url);
+ else
+ hprintf("[%s: %s]", ref->type, ref->url);
+ }
+ if (showrefinline || showurlinline) {
+ endmarkup(MarkupReverse);
hflush();
+ }
}
handleendtag(&(cur->tag));
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.