Commit graph

156 commits

Author SHA1 Message Date
Geoff McLane 944b412fe6 Need extra include if UNICODE is defines 2015-06-02 20:44:00 +02:00
Geoff McLane b8bc88522c small fix for indent-with-tabs to have a default xml value 2015-05-25 16:48:39 +02:00
Denis Denisov 5a28d5f010 5.0.0
htacg/tidy-html5#190
2015-05-24 23:49:00 +03:00
Geoff McLane d923dd7b2d Issue #108 - first cut new option --indent-with-tabs yes. 2015-05-22 16:06:12 +02:00
Geoff McLane 5d5e689f1a For issue #212, retain mixed mode block parsing.
This is particularly for the anchor tag which in html5 mode is parsed in
ParseBlock. That is retain a leading space, in case it needs to be
moved to in front of the block to keep space rendering.
2015-05-13 12:35:06 +02:00
Geoff McLane 963caf0741 add counter for in ParseBlock 2015-05-12 17:14:09 +02:00
Geoff McLane c1a3100cb9 add conveninet break point based on row and column 2015-05-12 17:13:23 +02:00
Geoff McLane b2b9f1d6f2 spelling error noted in exploration of #207 in localize.c 2015-04-26 19:19:55 +02:00
Dmitry Ivanov 9a3f85d44c Support build with MinGW 4.9.1 2015-04-26 13:18:46 +03:00
Geoff McLane 2f6b3d49b6 Merge pull request #202 from aerilon/master
Please pull fix for #198 and #199
2015-04-22 21:24:12 +02:00
Geoff McLane f5eb2cf26a Issue #196 - expand comment and bump version.
Thanks to @willydee for this PR.
2015-04-11 15:25:07 +02:00
willydee 253a7e54c3 Fix for #196: HTML5 allows block elements in <CAPTION> 2015-04-11 15:06:35 +02:00
Arnaud Lacombe c05661df11 Issue #199 - Add support for html5's template tag 2015-04-10 15:50:07 -07:00
Geoff McLane e78c0105d3 Indicated by #191, why show doctype warning if omitted in output 2015-04-08 18:45:31 +02:00
Geoff McLane 5cbd3ee95b From issue #191, saw need to revert to 'master' branch 2015-04-08 17:55:12 +02:00
Geoff McLane 3585d4c31a Issue #186 - Move FreeLexer() to near last 2015-03-19 19:14:27 +01:00
Geoff McLane 79ac8b2554 Issue #185 - Treat elements ids as case-sensitive if in HTML5 mode 2015-03-13 19:47:28 +01:00
Geoff McLane 66a597f5b7 related to issue #180 - remove additional line unless 'classic' 2015-03-10 12:27:29 +01:00
Geoff McLane 9caab688f1 debug - avoid duplicae output if to stdout 2015-03-09 16:12:59 +01:00
Geoff McLane fd7b4f8589 just some more DEBUG on text nodes 2015-03-06 19:28:52 +01:00
Geoff McLane c0cad3aeba Issue #167 - further fixes for HTML5 mode 2015-03-06 19:13:06 +01:00
Geoff McLane 389ce17814 add attr to dbg_show_node 2015-03-06 18:36:01 +01:00
Geoff McLane 0dc68d6cb1 Issue #167 & #169 - default to HTML5 mode.
Revert TidyTag_A to HTML5 mode, but allow the table to be modified if the
DOCTYPE given is found to NOT be HTML5, through a service TY_(AdjustTags).
Care is taken to clear any previous hash cached tags.

At present this only effects the anchor tag, but could be applied to
others that need to change their parsing due to an identified DOCTYPE.
2015-03-06 12:55:24 +01:00
Geoff McLane 606ffebd47 Issue #168 - Fix for access test 5.2.1.2 2015-03-04 19:38:59 +01:00
Geoff McLane 86f626cd67 Issue #167 - revert anchor tag to inline only 2015-02-28 20:30:56 +01:00
Geoff McLane 4b2943edb3 Issue #162 - fix for this while hopefully maintaining #111 fix.
The fix for #111 added an end tag for all StartEnd tags, when outputting
HTML5, but there should be some exceptions to this.

Added a new service, isVoidElement(node) for the void elements. Perhaps
this service could be further optimised.
2015-02-24 17:51:59 +01:00
Geoff McLane cfffe7765f Issue #166 - repeated main element.
With this fix introduced two new services, FindNodeById and
FindNodeWithId. The former does a total tree search for a TidyTagId.

Maybe there is a way to optimise this search...

Also change the uint badForm from an on/off to a bit field, so could be
extended to other document format errors.
2015-02-24 15:04:19 +01:00
Geoff McLane a5629443e6 Just improve some debug output 2015-02-24 13:20:26 +01:00
Geoff McLane 70d7e58d8d Add macro nodeIsMAIN(n) 2015-02-22 20:53:14 +01:00
Geoff McLane 0aa81eb256 Issue #130 - MathML attr and entity fix!
This is a set of kludgy fixes for MathML attribute and entities support.

It is intended that a full HTML5 entity table be added at some time, but
at present ALL entities are accepted as written when within the math
element.

Likewise all attributes are accepted on MathML elements without any check
of their name or value, even if they match attributes outside MathML.

And in the pprinter such entities are written as is from the lexer, using
a new PPrintMathML service added, using the new mode OtherNameSpace.

It is hoped all these fixes will NOT effect tidy outside the math element.

ALL fixes in the set a clearly marked '#130 - MathML attr and entity fix!'
for easy searching, and improving if possible.
2015-02-22 18:58:55 +01:00
Frédéric Wang fe51244d4a Use HTML5 mapping for entities &lang; and &rang; (http://www.w3.org/TR/xml-entity-names/#diff-xhtml1). #130 2015-02-21 19:33:24 +01:00
Geoff McLane b144b834cd Add a show_all_nodes debug service 2015-02-19 19:14:40 +01:00
Geoff McLane 6e3b293985 Issue #130 - Add TidyAttr_DISPLAY for math tag 2015-02-13 18:37:07 +01:00
Jim Derry 04f68a032f Changed text to point to html-tidy.org 2015-02-13 19:17:25 +08:00
Geoff McLane cff3fdd308 Issue #133 - hopefully a better fix.
As predicted the previous fix had adverse consequences on say script text,
which then lost the indent, and was reverted.

This introduces a new service, nodeIsTextLike, which naturally returns yes
if it is text, but also is an AspTag.

Maybe other text like nodes need to be added.
2015-02-12 15:24:38 +01:00
Geoff McLane 5d2cbd10dc Revert "Issue #133 - ever increasing indent!"
This reverts commit 0f80c08355.

This commit had other BAD consequences
2015-02-12 14:56:51 +01:00
Geoff McLane ea50bd30e7 add comment only for potential fix of Issue #8 2015-02-10 15:32:05 +01:00
Geoff McLane 279c29bf8d Issue #20 - revert to 880221e fix this issue 2015-02-10 15:28:56 +01:00
Geoff McLane cbd9eb7903 Issue #155 - issue warnings unless --show-body-only yes 2015-02-07 13:56:13 +01:00
Geoff McLane b26291ec6b Issue #151 - Initial implementation of picture element.
TODO: check, verify the picture attribute list.
2015-02-07 13:42:22 +01:00
Geoff McLane d72e681d32 Issue #152 - add srcset and sizes to img tag 2015-02-06 19:24:04 +01:00
Geoff McLane 2172a498f6 Issue #153 - fix for endif section no conforming to what tidy expects 2015-02-05 19:01:34 +01:00
Geoff McLane 66951a562a add row/col to DEBUG output 2015-02-05 18:24:02 +01:00
Geoff McLane 1be5ccbb63 Issue #130 - initial MathML support 2015-02-05 12:21:08 +01:00
Geoff McLane 698396eaa0 Issue #149 - avoid crash on null attr value 2015-02-03 13:38:20 +01:00
Geoff McLane 885c7caab7 Issue #70 - Initial implmentation of SVG support.
An immense thanks to Ger Hobbelt who had already done this
in his github.com/GerHobbelt/htmltidy fork.

The two sources have diverges so was not a simple cut
an paste. But again thanks Ger for this.
2015-02-02 17:36:27 +01:00
Geoff McLane 63c6671f59 Issue #126 - partial fix for indenting style 2015-02-01 18:35:28 +01:00
Geoff McLane 7a3afd41ca Issue #132 - avoid warning if configured to omit-optional-tags.
Difficult decision to avoid head warning.
2015-02-01 16:05:39 +01:00
Geoff McLane 3e0cfbb88d Merge branch 'develop-500' of github.com:htacg/tidy-html5 into develop-500 2015-02-01 14:40:30 +01:00
Geoff McLane 0f80c08355 Issue #133 - ever increasing indent!
This is a simple but profound change in pprint.c.
Since leading space is preserved on script code, after tidy indents
the code once, a second run on that tidied file would add more indent
to already indented code. This fix should be carefully checked,
and removed if there are other bad consequences.
Bump the version point to 4 for this change.
2015-02-01 14:34:22 +01:00