diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1999-04-23 15:06:34 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1999-04-23 15:06:34 -0400 |
commit | a735f5ad5123baaa15a0057515f3b242c5d3f372 (patch) | |
tree | 58936995ce9e2afd4ba65a735fd44c15509db19a /src/HTML.c | |
parent | b223937ff728f8242329bedb9c660e81da253e9a (diff) | |
download | lynx-snapshots-a735f5ad5123baaa15a0057515f3b242c5d3f372.tar.gz |
snapshot of project "lynx", label v2-8-2dev_23
Diffstat (limited to 'src/HTML.c')
-rw-r--r-- | src/HTML.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/HTML.c b/src/HTML.c index 40cb1f2d..09c10d4e 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -49,12 +49,15 @@ #include <LYCurses.h> #endif /* VMS */ +#ifdef USE_PSRC +#include <LYPrettySrc.h> +#endif + #ifdef USE_COLOR_STYLE #include <SGML.h> #include <AttrList.h> #include <LYHash.h> #include <LYStyle.h> -#include <LYPrettySrc.h> #undef SELECTED_STYLES #define pHText_changeStyle(X,Y,Z) {} @@ -2281,7 +2284,23 @@ PRIVATE void HTML_start_element ARGS6( case HTML_DT: CHECK_ID(HTML_GEN_ID); if (!me->style_change) { + BOOL in_line_1 = HText_inLineOne(me->text); + HTCoord saved_spaceBefore = me->sp->style->spaceBefore; + HTCoord saved_spaceAfter = me->sp->style->spaceAfter; + /* + * If there are several DT elements and this is not the first, + * and the preceding DT element's first (and normally only) line + * has not yet been ended, suppress intervening blank line by + * temporarily modifying the paragraph style in place. Ugly + * but there's ample precedence. - kw + */ + if (in_line_1) { + me->sp->style->spaceBefore = 0; /* temporary change */ + me->sp->style->spaceAfter = 0; /* temporary change */ + } HText_appendParagraph(me->text); + me->sp->style->spaceBefore = saved_spaceBefore; /* undo */ + me->sp->style->spaceAfter = saved_spaceAfter; /* undo */ me->in_word = NO; me->sp->style->alignment = HT_LEFT; } @@ -7696,19 +7715,19 @@ PRIVATE HTStream* CacheThru_new ARGS2( { char filename[LY_MAXPATH]; HTStream *stream = NULL; - HTProtocol *p = (HTProtocol *)anchor->protocol; +/* HTProtocol *p = (HTProtocol *)anchor->protocol; */ /* * Neatly and transparently vanish if source caching is disabled. */ if (LYCacheSource == SOURCE_CACHE_NONE) return target; - +/* if (strcmp(p->name, "http") != 0) { CTRACE(tfp, "Protocol is \"%s\"; not caching\n", p->name); return target; } - +*/ stream = (HTStream *) malloc(sizeof(*stream)); if (!stream) outofmem(__FILE__, "CacheThru_new"); |