From 1d1833659f91e213385bb741e424b4a197f54ceb Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sat, 30 May 2009 12:57:46 -0400 Subject: snapshot of project "lynx", label v2-8-7pre_4b --- WWW/Library/Implementation/SGML.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'WWW/Library/Implementation') diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index e89d74b2..35379e2d 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -1,5 +1,5 @@ /* - * $LynxId: SGML.c,v 1.130 2009/05/25 18:17:36 tom Exp $ + * $LynxId: SGML.c,v 1.131 2009/05/30 11:21:28 tom Exp $ * * General SGML Parser code SGML.c * ======================== @@ -2359,13 +2359,31 @@ static void SGML_character(HTStream *context, char c_in) testlast >= 0 && !testtag->name[testlast]) { #ifdef USE_PRETTYSRC if (psrc_view) { + char *trailing = NULL; + + if (context->trailing_spaces) { + StrAllocCopy(trailing, + string->data + + string->size + - 1 + - context->trailing_spaces); + trailing[context->trailing_spaces] = '\0'; + } + PSRCSTART(abracket); PUTS("data, context->current_tag->name); transform_tag(context, string); PUTS(string->data); + + if (trailing) { + PUTS(trailing); + FREE(trailing); + } + PSRCSTOP(tag); PSRCSTART(abracket); PUTC('>'); -- cgit 1.4.1-2-gfad0