diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-26 09:29:18 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-26 09:29:18 +0100 |
commit | 3febbc53e856fbead777d391819d4537258ca389 (patch) | |
tree | bc2d4cc50c9ce96da61787a54b714c9dd867b40a /src | |
parent | 7cce4efeeb8802989bc1d6fa4a1c7b393f1f9419 (diff) |
switch to DILLO_HTML_PARSE_MODE_PRE based on style->whiteSpace
Diffstat (limited to 'src')
-rw-r--r-- | src/html.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/html.cc b/src/html.cc index b1172356..35648634 100644 --- a/src/html.cc +++ b/src/html.cc @@ -2665,10 +2665,6 @@ static void Html_tag_open_pre(DilloHtml *html, const char *tag, int tagsize) { DW2TB(html->dw)->addParbreak (9, html->styleEngine->wordStyle ()); - /* Is the placement of this statement right? */ - S_TOP(html)->parse_mode = DILLO_HTML_PARSE_MODE_PRE; - html->pre_column = 0; - html->PreFirstChar = true; html->InFlags |= IN_PRE; } @@ -3326,6 +3322,13 @@ static void Html_parse_common_attrs(DilloHtml *html, char *tag, int tagsize) if (attrbuf) html->styleEngine->setStyle (attrbuf); } + + if (S_TOP(html)->parse_mode != DILLO_HTML_PARSE_MODE_PRE && + html->styleEngine->style ()->whiteSpace == WHITE_SPACE_PRE) { + S_TOP(html)->parse_mode = DILLO_HTML_PARSE_MODE_PRE; + html->pre_column = 0; + html->PreFirstChar = true; + } } /* |