Commit graph

52 commits

Author SHA1 Message Date
Jim Derry 009da61f8b Fixes #836. Version bump to reflect change. Test cases added. 2021-07-09 15:51:14 -04:00
lhchavez e51cd17c2d
Support the <slot> tag (#848)
* Support the <slot> tag

<slot> was added to the WHATWG HTML5 Living Standard on April 20, 2016.

* Also support the slot= attribute

Given that the <slot> tag by itself is not too useful, this commit also
introduces support for the global slot attribute.

* Using ParseBlock for <slot>

This is still suboptimal since ParseBlock will make it so that <slot>
always expects "Flow content", whereas the spec says that it should
have a Transparent content model.

In practice, it should allow all the cases that the spec allows for, but
it will also allow some cases that the spec does not allow. Notably, if
a <slot> tag is found in a Phrasing content (an inline context in
libtidy lingo), it will wrongly let Flow content (block tags in libtidy
lingo), whereas it shouldn't. But all in all, it's a good compromise.
2020-11-21 16:31:28 +01:00
Russell Morris 34cb411dd5 Correction for issue-895
As proposed by @geoffmcl - thanks!
2020-09-30 19:57:08 -05:00
Antonios Hadjigeorgalis 5d4e46b333 Issue#649: added <data> tag
<time> tag used as model for adding <data> tag
2018-11-06 20:54:36 -05:00
Jim Derry f5bdedecaf Cleanup
- Added doxygen documentation to `tags.h`
- Consistency to `tags.c` header.
- Moved TY_(DeclareUserTag) to tags.c/.h for consistency with the other list
  parsing declaratory functions.
- Merged user tags parsing into the general list, eliminating a lot of redundant
  code.
2017-10-29 14:58:02 -04:00
Geoff McLane 3b154dc407 Issue #604 - Try to fix. Initial cut. WIP 2017-10-13 20:50:53 +02:00
Jim Derry 0977aa6077 Removed dependency on NDEBUG, and introduced ENABLE_DEBUG_LOG in CMakeLists.txt.
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.
2017-10-07 14:56:01 -04:00
Jim Derry dedcb7bb4d SPRTF is now compatible with macOS and Linux, and most likely all supported
platforms.
2017-10-03 22:31:55 -04:00
Jim Derry 4e3c1a1562 Move all of the sprtf includes into tidyplatform.h 2017-10-03 20:42:29 -04:00
Jim Derry 8d7e5f7f5a Documentation formatting. 2017-10-03 15:30:21 -04:00
Jim Derry ff030aab7a ELEMENT_HASH_LOOKUP is no longer conditional, and is a permanent part of Tidy. 2017-10-03 14:04:32 -04:00
Jim Derry 238b8f0a66 Wipe out dead code. We use git for a reason, so it's never really deleted. 2017-10-03 13:56:31 -04:00
Jim Derry d3129694c7 Address #616
- Fix the declaration and parser for the bdi tag.
2017-09-29 15:15:33 -04:00
Jim Derry 283f8974c3 Migrated reports using formatFileError and formatStandard to flexible messaging system. Migrated old reportNotice() to report(). 2017-09-04 11:24:48 -04:00
Jim Derry 66e4d1f8e6 Migrated reports using formatter formatCustomTagDetected. 2017-09-02 18:04:51 -04:00
Jim Derry 46aa9605ee All reports that can use formatAttributeReport are now using it. Moved the
badAccess flag to the point of detection.
2017-09-02 17:29:56 -04:00
Jim Derry e5eb09198d Begin migration towards "one output function to rule them all." Consolidated
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.
2017-08-30 20:01:44 -04:00
Geoff McLane b03598652f Issue #461 - alternative patch for this issue 2017-05-02 19:39:16 +02:00
Jim Derry da55a6e4ac Removed unused declaration. 2017-03-16 08:00:05 -04:00
Jim Derry 0c5550b06f I think the messages are where I want them to be. Will generate test cases
for comparison. Also regen'd all pots and language headers.
2017-03-15 17:36:05 -04:00
Jim Derry 5606f32f13 WIP; messaging much more logical, except @todo noted. 2017-03-14 21:50:10 -04:00
Jim Derry 66ade9def4 Still noisy, but adds HTML5 dependent output message upon detection. 2017-03-14 16:27:11 -04:00
Jim Derry ed5a1d84ea Add TY_(nodeIsAutonomousCustomTag), so we can use it elsewhere. 2017-03-14 15:44:46 -04:00
Jim Derry 66de84bc2b - Add support for the is attribute.
- Add support for autonomous custom elements.
2017-03-13 13:45:32 -04:00
Marcos Caceres 91da8c6f74 style: ansi conforming comments 2016-12-20 16:51:09 +11:00
Raphael Ackermann b704a4d0d4 allow zero LI in UL when html5. fix for #396 2016-04-08 23:08:56 +02:00
Geoff McLane 7bdc31af76 Issue #377 - Table summary attribute also applies to XHTML5 2016-02-29 19:58:55 +01:00
Jim Derry 9834cc17ad Style cleanup for previous commit. 2015-11-27 09:45:26 +08:00
Jim Derry 933fc3d236 - Addresses #320
- Different error output depending on whether or not the `alt-text` option was given a value.
2015-11-26 13:23:43 +08:00
Geoff McLane d75c82275d Issue #285 - Add a ResetTags func to erset html5 mode before each document 2015-10-14 16:55:35 +02:00
Geoff McLane 38ef5bfe85 Issue #232 remove CM_HEAD from 'object' tag 2015-07-30 14:50:15 +02:00
Geoff McLane 3f72b6e335 Issue #210 - Add new warning for summary attr in table if HTML5.
This new warning will only be seen if the document remains in HTML5 mode,
where the summary attribute is obsolete. The W3C validator flags this as
an error, and suggests 'Consider describing the structure of the table in
a caption element or in a figure element containing the table; or simplify
the structure of the table so that no description is needed'.

At the same time this patch also restored the old warning if the document
is HTML4--, if the table element lacks a summary attribute. This has been
a tidy warning since the beginning of time, although the W3C validator
does not presently flag this.
2015-06-06 11:20:35 +02: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
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 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 86f626cd67 Issue #167 - revert anchor tag to inline only 2015-02-28 20:30:56 +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 1be5ccbb63 Issue #130 - initial MathML support 2015-02-05 12:21:08 +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
Jim Derry e6930feb02 Fixes #78 by treating canvas as a block level tag. 2015-02-01 19:28:38 +08:00
Geoff McLane 0eb1407818 Issue #102 - fix this regression bug 2015-01-29 18:25:19 +01:00
Geoff McLane 6c37493c75 get list of tags WITHOUT HT50 version 2014-08-08 19:20:28 +02:00
Geoff McLane 78c0080eb8 main code updates to do HTML5 2014-08-03 20:33:29 +02:00
Geoff McLane 39b860b1a7 Continue to remove CVS Info from source 2014-08-03 18:46:37 +02:00
geoff mclane 8877662b54 Bring fork up to html5.patch patched version 2012-01-17 15:54:00 +01:00
Michael[tm] Smith c1be54071d Make action not required on form. 2011-12-10 12:21:10 +09:00
Michael[tm] Smith 4fdc30c120 summary attribute is not required on table in HTML5 2011-11-21 12:34:05 +09:00
Michael[tm] Smith 34305a13d1 report missing href & rel for link elements 2011-11-20 20:58:35 +09:00
Michael[tm] Smith 2144093509 script does not require a type attribute 2011-11-20 19:42:54 +09:00