[PATCH] highlight external quotes
Hello, the attached patch adds the ability to highlight external quotes (quoted text from external sources). This could be for instance a citation or a program output. Usually, such things are marked with "| ". Examples: RFC xy says: | Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy | eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam | voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet | clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit | amet. or: | dennis@coredump:~/src/tin-2.3.1_r8% ls -oh | total 2560 | -rw-r--r--@ 1 dennis 7.9K 24 Dec 2014 MANIFEST | -rw-r--r--@ 1 dennis 14K 24 Dec 2014 Makefile | -rw-r--r--@ 1 dennis 1.4K 28 Aug 2013 README | […] The patch contains a variable to switch this feature on and off (extquote_handling, default OFF, tinrc and attributes), a regex (extquote_regex, default "^|\s", tinrc) and a color definition (col_extquote, default color 5, tinrc). This feature is similar to the verbatim marks, but I think it's still useful. Dennis
On Thu, Oct 08, 2015 at 09:39:18PM +0200, Dennis Preiser wrote:
(extquote_handling, default OFF, tinrc and attributes), a regex (extquote_regex, default "^|\s", tinrc) and a color definition (col_extquote, default color 5, tinrc).
"^|\s" is included in DEFAULT_QUOTE_REGEX: ^\s{0,3}(?:[\]{}>|:)]| ^^^^^ ^ with use_color=ON, extquote_handling=ON and col_extquote!=col_quote I still get col_quote colored lines, IMHO the flags |= C_EXTQUOTE should be done right after flags |= C_QUOTE2 and before flags |= C_QUOTE1 in cook.c:process_text_body_part() ~ 664 urs -- "Only whimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it ;)" - Linus
On Fri, Oct 09, 2015 at 12:17:57AM +0200, Urs Janßen wrote:
On Thu, Oct 08, 2015 at 09:39:18PM +0200, Dennis Preiser wrote:
(extquote_handling, default OFF, tinrc and attributes), a regex (extquote_regex, default "^|\s", tinrc) and a color definition (col_extquote, default color 5, tinrc).
"^|\s" is included in DEFAULT_QUOTE_REGEX: ^\s{0,3}(?:[\]{}>|:)]| ^^^^^ ^
Ups. I use a modified version without "|" for some reason... Probably related with these external citations ;-)
with use_color=ON, extquote_handling=ON and col_extquote!=col_quote I still get col_quote colored lines, IMHO the flags |= C_EXTQUOTE should be done right after flags |= C_QUOTE2 and before flags |= C_QUOTE1 in cook.c:process_text_body_part() ~ 664
I have attached a patch for this. Dennis
participants (2)
-
Dennis Preiser -
Urs Janßen