Commit graph

348 commits

Author SHA1 Message Date
Geoff McLane 61a0a331fc Issue #390 - fix indent with --hide-endtags yes.
The problem was, with --hide-endtags yes, a conditional pprint buffer
flush had nothing to flush, thus the indent was not adjusted.

To track down this bug added a lot of MSVC Debug code, but is only
existing if some additional items defined, so has no effect on the release
code.

This, what feels like a good fix, was first reported about 12 years ago by
@OlafvdSpek in SF Bugs 563. Hopefully finally closed.
2016-04-04 18:13:08 +02:00
Geoff McLane 7598fdfff2 avoid DEBUG duplicate newline 2016-04-03 17:54:46 +02:00
Geoff McLane 7777a71913 Issue #369 - Remove Debug asserts 2016-03-31 14:50:03 +02:00
Geoff rpi McLane 086e4c948c remove gcc comment warning 2016-03-30 15:02:19 +00:00
Geoff McLane 59d6fc7022 Issue #377 - If version XHTML5 available, return that. 2016-03-30 16:28:08 +02:00
Geoff McLane 1830fdb97c Issue #384 - insert comments 2016-03-30 14:18:04 +02:00
Geoff McLane 4b135d9b47 Merge pull request #384 from seaburg/master
Fix skipping parsing character
2016-03-30 14:08:40 +02:00
Geoff McLane e87f26c247 Merge pull request #388 from htacg/fr.po
Merge fr.po to master
2016-03-27 19:54:54 +02:00
Jim Derry 7d2ddee775 Add new rebase command to CLI.
This is intended to make it very, very easy to update the POT and all of the POs when
changes are made to `language_en.h`. Used without an sha-1 hash, untranslated strings
(i.e., the "source" strings) are updated in the POT/PO's.

However if you specify an --sha=HASH (or -c HASH) option, then the script will use git
to examine the `language_en.h` file from that specified commit, determing the strings
that have changed, and mark all of these strings as `fuzzy` in the POs. This will serve
as a flag to translators that the original has changed. In addition, this `fuzzy` flag
will appear in the headers as "(fuzzy) " in the item comments.

If a translator edits the header directly, he should remove the "(fuzzy )" in the
comment. Then when the PO is rebuilt, the fuzzy flag will be removed automatically.
The reverse is also true; if a translator is working with the PO, he or she should
clear the fuzzy flag and the comment will be adjusted accordingly in the generated
header.
2016-03-25 09:21:21 +08:00
Geoff McLane 8671544beb Issue #383 - Add a WIP language_fr.h to facilitate testing 2016-03-24 14:15:43 +01:00
Geoff McLane 5feca8cfd6 Issue #383 - correct another byte-by-byte output to message file.
As in the previous case these messages are already valid utf-8 text, and
thus, if output on a byte-by-byte basis, must not use WriteChar, except
for the EOL char.

Of course this output can be to either a user ouput file, if configured,
otherwise stderr.
2016-03-24 14:15:43 +01:00
Jim Derry ad7bdee3b9 Added translator comments to new TidyEscapeScripts option, and updated POT and POs to reflect this. 2016-03-24 11:00:47 +08:00
Jim Derry 71d6ca1392 Oops. Didn't commit es changes. This fixes that. 2016-03-23 15:10:07 +08:00
Jim Derry d54785c933 language help enhancements:
- Show the language Tidy is using.
- Update the POT and POs with the modified string.
- Regen language_es.h, which uses the string.

Note that the new header uses the new commentless behavior that's still
pending in another branch. In addition the proper c style hints have
been added to all PO's, as their previous absense was a bug.
2016-03-23 14:56:36 +08:00
Jim Derry 2cf03f7fa9 Fix two character lang codes not working. 2016-03-23 14:38:17 +08:00
Geoff McLane 000c6925bd Issue #348 - Add option 'escape-script', def = yes 2016-03-20 01:01:46 +01:00
Geoff McLane e6f1533d89 Issue #383 - Output message file text byte-by-byte 2016-03-18 18:47:00 +01:00
Evgeniy Yurtaev 7d28b21e60 Fix skipping parsing character 2016-03-17 23:30:11 +03:00
Geoff McLane 8dda04f1df Issue #379 - Care about 'ix' going negative.
How this lasted so long in the code is a mystery! But of course it will
only be a read out-of-bounds if testing the first character in the lexer,
and it is a spacey char.

A big thanks to @gaa-cifasis for running ASAN tests on Tidy.
2016-03-06 17:36:51 +01:00
Geoff McLane 8eee85cb9e Issue #380 - Experimental patch in issue-380 branch 2016-03-05 17:39:14 +01:00
Geoff McLane 0e6ed639d6 Issue #380 - Add more MSVC debug 2016-03-04 19:28:49 +01:00
Geoff McLane d091027089 Issue #377 add debug only output of constrained versions 2016-03-03 20:21:35 +01:00
Geoff McLane 7bdc31af76 Issue #377 - Table summary attribute also applies to XHTML5 2016-02-29 19:58:55 +01:00
Geoff McLane 24c62cf0df Issue #314 - Avoid head warning if show-body-only 2016-02-29 18:49:15 +01:00
Geoff McLane 23e689d145 Issue #373 - Merge branch 'issue-373' of github.com:htacg/tidy-html5 into issue-373
Conflicts: version.txt - set version 5.1.41issue-373
2016-02-18 15:18:39 +01:00
Geoff McLane 8c13d270ed Merge branch 'master' of github.com:htacg/tidy-html5 2016-02-18 13:58:23 +01:00
Geoff McLane b91d52592b Fix to K&R C to compile with MSVC 2016-02-18 13:57:47 +01:00
Jim Derry 63c0327de1 Fixed typo in output strings. 2016-02-18 15:40:10 +08:00
Jim Derry e00f419f5d Discovered some missing strings from tidyErrorFilterKeysStruct. 2016-02-18 10:19:57 +08:00
Jim Derry da8205b2dc Regen'd POT, POs, and headers in order to capture documentation changes in all of them. 2016-02-17 20:07:00 +08:00
Jim Derry 7fbe76be0b Finished semantic html. 2016-02-17 20:02:38 +08:00
Jim Derry a78daccd3c Through TidyIndentSpaces. 2016-02-17 17:43:09 +08:00
Jim Derry a16e89c4f8 Updated translator comments. 2016-02-17 17:27:57 +08:00
Jim Derry d30c2d7747 XSL for man handles <var>. Updated comment and sample string. 2016-02-17 17:20:02 +08:00
Jim Derry cc59efb23d Add a xml-error-strings service to console app providing symbols developers can use with TidyErrorFilter3. 2016-02-17 12:35:20 +08:00
Jim Derry bc1e54d5b5 Externalize the TidyReportFilter3 error codes, and provide iterators to loop through them. 2016-02-17 12:27:11 +08:00
Jim Derry 720d5c25d2 Squelch compiler warning default type. 2016-02-17 10:56:21 +08:00
Jim Derry 97abad0c05 Bump to 5.1.39 for merging.
Merge branch 'master' into attrdict_phase2
2016-02-16 11:11:36 +08:00
Jim Derry 3431dd05a4 Merge branch 'master' into attrdict_phase1
Bump version to 5.1.38
2016-02-16 11:07:32 +08:00
Jim Derry 1e4f7dd0f1 Merge pull request #368 from htacg/issue-341
Issue #341
2016-02-16 10:18:26 +08:00
Geoff McLane 9cf97d536b Issue #373 - Avoid a null added to output.
This bug was first openned in 2009 by Christophe Chenon, as bug sf905 but
the patch provided then never made it into the source.

Now appears fixed, 7 years later!
2016-02-15 13:02:10 +01:00
Geoff McLane a4f425546f Improve MSVC DEBUG output.
Previous only output the first 8 characters, followed by an elipse if more
than 8. Now return first up to 19 chars. If nore than 19, return first 8,
followed by an elipse, followed by the last 8 characters.

This is in the get_text_string service, which is only used if MSVC and not
NDEBUG.
2016-02-14 18:17:46 +01:00
Jim Derry c62127b9bd Default to NO at this point. 2016-02-13 12:33:02 +08:00
Jim Derry 8b5771cf24 Word2000
Added messages that would otherwise be missed in post-processing, after cleanup.
2016-02-13 12:26:19 +08:00
Jim Derry 2cdedb4a63 Forgot one file... 2016-02-13 11:53:53 +08:00
Jim Derry 896b00238b Forgot one file... 2016-02-13 11:53:40 +08:00
Jim Derry 2ade3357a9 Phase 2
This is a MUCH SANER approach to what I was trying to do (now that I screwed up enough internals to understand some of them!
At this point there are zero exit state reversions, and zero markup reversions! There are still 21 errout reversions; I'll
annotate and adjust as necessary.
2016-02-13 11:31:16 +08:00
Jim Derry e947d296e4 Handle some issues with misusing VERS_HTML5 in the doctype. 2016-02-12 20:49:14 +08:00
Jim Derry c81a151da5 Add VERS_STRICT to identify future strict document types. 2016-02-12 20:46:49 +08:00
Jim Derry 74604fd52b Hard-coded checks are redundant with updates to attrdict.c. 2016-02-12 20:44:03 +08:00
Jim Derry 429703dce4 Because the previous effort #350 grew too fast and there was a LOT of side effects to
my changes, I'm starting over with this. Comments in the PR thread.

This commit reduces the size of attrdict.c while causing only a single errout
regression that is justified.
2016-02-12 19:34:19 +08:00
Geoff McLane 03a643f781 Issue #341 - No token can be inserted if istacksize == 0! 2016-02-08 15:12:23 +01:00
Geoff McLane 7d0d8a853a Issue #345 - discard leading spaces in href 2016-02-01 20:07:55 +01:00
Geoff McLane 7f0d5c31e6 If no doctype, allow user doctype to reset table - Issue #342 2016-02-01 19:44:30 +01:00
Geoff McLane c1f94c066c Tidy up some debug only code.
After @sria91 added #360 merge, added a little more improvement...
2016-01-30 20:51:27 +01:00
Srikanth Anantharam 9a0af48a4e fixed a NULL node bug in debug build 2016-01-30 22:03:52 +05:30
Jim Derry 9ae15f45a7 Consistent tabs
Fixed tabs in template file, and regen'd all related files.
2016-01-30 15:51:54 +08:00
Jim Derry 53f2a2da2a msgunfmt works properly with escaped hex. 2016-01-30 15:51:53 +08:00
Martin von Gagern 17e50f2642 Encode UTF-8 strings to hex escapes in header files 2016-01-30 15:51:53 +08:00
Jim Derry bf70824cc2 - Add TidyReportFilter3, which removes translation strings completely from the equation. It would be a good idea to deprecate TidyReportFilter2, which is vulnerable to changing strings in Tidy source.
- Documentation reminders for future enum changes.
- Documentation updates.
2016-01-30 15:51:53 +08:00
Jim Derry d505869910 Localization Support added to HTML Tidy
- Languages can now be added to Tidy using standard toolchains.
- Tidy's help output is improved with new options and some reorganization.
2016-01-30 15:51:53 +08:00
Jim Derry 26e7d9d4b0 Fixes Mac OS X encoding issues and harmonizes output across platforms.
Previously Tidy produced different output based on the compilation target, NOT based on
the file encoding and specified options. Every platform was equal except Mac OS. Now unless
the encoding is specifically set to a Mac file type, all encoding assumptions are the same
across platforms.
2015-12-31 13:57:34 +08:00
Geoff McLane 78f2d52cdd Issue #308 - remove bad warn, bad assert, and free discarded 2015-12-05 15:03:41 +01:00
Geoff McLane 9caecb80cf Revert "Fix for head closing tag not reported (#327)"
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.
2015-12-05 12:59:43 +01:00
Geoff McLane 3b13cd8076 Merge branch 'mingw-build' 2015-12-03 19:18:07 +01:00
Jim Derry 61cfcb1555 Fix for head closing tag not reported (#327) 2015-11-29 13:21:49 +08:00
Jim Derry 873794162a Callback added to XML printer, too; fixed off-by-one error. 2015-11-29 07:39:33 +08:00
Geoff McLane dc969f30d5 Issue #311 - small changes for MinGW32 build 2015-11-28 15:14:53 +01:00
Jim Derry 4adc07fd65 Removed the one callback per line filter. Library user can filter this himself. 2015-11-28 15:43:34 +08:00
Jim Derry dcd8f16f73 Tidying progress callback implemented. 2015-11-28 15:34:23 +08:00
Jim Derry 34d456aa80 Make pretty printer keep track of line numbers as it prints. 2015-11-28 14:16:17 +08:00
Jim Derry 9834cc17ad Style cleanup for previous commit. 2015-11-27 09:45:26 +08:00
Jim Derry 1c963acb58 Merge branch 'master' into fix_img_alt 2015-11-27 09:36:32 +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
Jim Derry 63234735d8 Allows null value css-prefix to be used in a config file without issuing a warning. 2015-11-26 11:21:48 +08:00
Ben Bullock 71d9638448 Don't push back non-A tokens. 2015-11-25 18:00:45 +09:00
Christopher Brannon 1ef5ba7968 Fix a tiny buffer overflow. 2015-11-23 12:28:00 -08:00
Geoff McLane b58aa1c26a Issue #307 - add a ref link in comments 2015-11-22 20:43:12 +01:00
Geoff McLane 2388fb0175 Issue #307, #167, #169 - regression of nestd anchors 2015-11-22 18:46:00 +01:00
Geoff McLane bbc72a9297 Issue #306 - fix an old typo hidden by a cast!
Thanks to @benkasminbullock for spotting this fix.
2015-11-18 20:01:21 +01:00
Geoff McLane e2feed485c gcc warning - if 0 an unused static table 2015-11-18 17:06:13 +01:00
Geoff R. McLane b98061ff62 fix gcc warning parentheses in pprint.c 2015-11-18 16:47:58 +01:00
Geoff McLane 768ad46968 Issue #304 - remove duplicated TidyAttr_ARIA_ORIENTATION 2015-11-17 15:06:23 +01:00
Shane McCarron c0b769c5c7 Initial cut at RDFa support (again)
New branch that implements support for RDFa attributes.  Should be
cleaner than my first attempt in PR #299 - also references issue #209
2015-11-16 11:29:23 -06:00
Paul Howarth baad0b0064 Don't mangle the output filename
Attached patch works for me, and shouldn't affect any other option
processing.
2015-11-11 11:28:47 +01:00
Geoff McLane c68ad42482 Revert 22a1922c35 2015-11-07 14:50:10 +01:00
Shane McCarron c572e3e3c8 Initial cut at supporting RDFa attributes. 2015-11-06 12:19:05 -06:00
Geoff McLane 800b91e576 Issue #65 - effect name change to skip-nested, and default to on 2015-11-05 15:19:39 +01:00
Jim Derry 32ce272f75 Fix indent-with-tabs for library use. 2015-11-04 12:44:15 +08:00
Jim Derry dec6356a6f Deleted multiple equal id attributes. 2015-11-02 15:31:47 +08:00
Jim Derry d0ac990636 More description beautification. 2015-11-02 12:06:37 +08:00
Jim Derry 807fed4ff6 Documentation improvements. 2015-11-01 19:05:03 +08:00
Jim Derry 2613f02dc5 More documentation beautification. 2015-10-31 22:03:33 +08:00
Jim Derry 565d2ec232 Documentation beautification underway. 2015-10-31 18:30:02 +08:00
Jim Derry cf3c0293c0 Additional tests with our troublesome option. 2015-10-31 14:45:51 +08:00
Jim Derry 8c5fae8c09 - documentation/quickref.xsl
- Includes <p> support
  - Matches the description class name in quickref.include.xsl
  - Styles <br /> to enforce vertical spacing (in the reference table only).
- documentation/style.css
  - Styles <br /> to enforce vertical spacing (in the reference table only).
- documentation/tidy1.xsl.in
  - Includes <p> support.
  - Better manages line breaks with .sp1 instead of .br.
- src/localize.c
  - Legibility to the troublesome `drop-font-tags` description.
2015-10-30 23:58:43 +08:00
Jim Derry 709ac8cb4c Support HTML in descriptions. 2015-10-30 18:17:40 +08:00
Jim Derry 09b0698c56 Typo. 2015-10-30 12:58:11 +08:00
Jim Derry a3138cb142 URL cleanup. 2015-10-30 12:23:20 +08:00
Jim Derry 2d0f971747 Update documentation to address #288. 2015-10-30 10:19:47 +08:00