Instead of recursive calls for each nested level of HTML, the next level is
pushed to a stack on the heap, and returned to the main loop. This prevents
stack overflow at _n_ depth (where _n_ is operating-system dependent). It's
probably still possible to use all of the heap memory, but Tidy's allocators
already fail gracefully in this circumstance.
Please report any regressions of your own HTML!
NOTE: the XML parser is not affected, and is probably still highly recursive.
This is a compromise -
1. Keep insertion of a blank title tag, if none.
2. Add new warn if title tag is blank, in html5
modified: include/tidyenum.h
modified: src/language_en.h
modified: src/message.c
modified: src/parser.c
By default Windows will continue to show SPRTF output, and other platforms will
require the -DENABLE_DEBUG_LOG to be set in default (debug) configurations.
Debug and Release builds on macOS, Windows 10, and Ubuntu 16.04 confirmed
working as most people expect.
- Change default value of `--fix-bad-comments` to `no`.
- Ensure that when _not_ fixing, nothing is actually fixed.
- Ensure that when fixing, initial adjacent hyphens actually are fixed.
- Issue tidyinfo for all fixes made.
- Issue tidywarning when when not making fixes for non-HTML5 doctypes.
the basic reporting functions that share the same signature. This also resulted
in eliminating a string, and adding a new string to disambiguate between
errors and warnings.
An earlier patch now passes back an all space text node. Previously this
would have been skipped. So add code in ParseList to detect, and discard
such a node.
Change committed:
modified: src/parser.c
parser and picklist system. Console application needs to be updated to fix
the description, as it shows autobool, and for some reason on the current
system I'm not getting assertion failures.
- tidyDetectedHtmlVersion()
- tidyDetectedXhtml()
- added two new fields to W3C_Doctypes[] in order to simplify this.
- added TY_(HTMLVersionNumberFromCode)() to enable lookup.
- Implement tidyDetectedGenericXml()
- Added a warning message if an XML declaration exists but the document is not
XHTML.
- Remove dead commented code.
- Updated POs and POT. Headers not affected, but translators should check
their translations.
- Testing is clean on Mac OS X, Ubuntu 16.04, and Windows 10.
The previous action was to discard the second, while it is the second
table that browsers will render.
This conforms to the principle that the html output by tidy should render
in a browser like the original html.
This reverts commit 61cfcb1555.
This added an inconsistent warning about a missing optional close tag. In
general tidy does not report such optional close tags. See issue #327 for
some discussion on this.
In certain circumstances a leading space has to be preverved to allow it
to be used to create a text space node to insert before this element to
preserve the view in a browser.
And added a note asking why is ParseTag called with a hardcoded
IgnoreWhitespace when some effort above has set the mode variable to
MixedContent in certain cases, but need to think about this 2nd change.
Also added some MSVC Debug output when this leading text is used to insert
such a created text node before the element just to be reminded of this
special event.
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.