Commit graph

989 commits

Author SHA1 Message Date
Jim Derry 1dbacc9c43 Bumped to 5.5.7 to support custom tags. 2017-03-19 08:09:43 -04:00
Jim Derry b3d6dc3d8a Merge pull request #514 from htacg/custom_tags
Support custom tags
2017-03-19 08:08:58 -04:00
Geoff McLane c8f366b76e Issue #119 - Remove 3 newline chars, that crept in... 2017-03-18 18:52:48 +01:00
Jim Derry 89e4a0215a Fixed the enum, which has TidyCustomTags and TidyUseCustomTags documented backwards. 2017-03-18 11:20:56 -04:00
Geoff McLane 73f68e2b2a Issue #119 - remove old debug code 2017-03-17 18:02:11 +01: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
Geoff McLane 61692401ce Issue #119 - be able to set RC number during lib build 2017-03-15 19:57:47 +01: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 8273491e16 Change allowed values for custom-tags, and make y equal to inline. 2017-03-14 15:16:11 -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
Jim Derry 96bb67045f Bump to 5.5.6 for messages system update. 2017-03-13 13:31:35 -04:00
Jim Derry 11178d775b Massive Revamp of the Messaging System
This is a rather large refactoring of Tidy's messaging system. This was done
mostly to allow non-C libraries that cannot adequately take advantage of
arg_lists a chance to query report filter information for information related
to arguments used in constructing an error message.

Three main goals were in mind for this project:

- Don't change the contents of Tidy's existing output sinks. This will ensure
  that changes do no affect console Tidy users, or LibTidy users who use the
  output sinks directly. This was accomplished 100% other than some improved
  cosmetics in the output. See tidy-html5-tests repository, the `refactor` and
  `more_messages_changes` branches for these minor diffs.
- Provide an API that is simple and also extensible without having to write new
  error filters all the time. This was accomplished by adding the new message
  callback `TidyMessageCallback` that provides callback functions an opaque
  object representing the message, and an API to query the message for wanted
  details. With this, we should never have to add a new callback routine again,
  as additional API can simply be written against the opaque object.
- The API should work the same as the rest of LibTidy's API in that it's
  consistent and only uses simple types with wide interoperability with other
  languages. Thanks to @gagern who suggested the model for the API in #409.
  Although the API uses the "Tidy" way off accessing data via an iterator
  rather than an index, this can be easily abstracted in the target language.

There are two *major* API breaking changes:

- Removed TidyReportFilter2
  - This was only used by one application in the entire world, and was a hacky
    kludge that served its purpose. TidyReportCallback (né TidyReportFilter3)
    is much better. If, for some reason, this affects you, I recommend using
    TidyReportCallback instead. It's a minor change for your application.
- Renamed TidyReportFilter3 to TidyReportCallback
  - This name is much more semantic, and much more sensible in light of
    improved callback system. As the name implies, it remains capable of
    *only* receiving callbacks for Tidy "reports."

Introducing TidyMessageCallback, and a new message interrogation API.

- As its name implies, it is able to capture (and optionally suppress) *all*
  of Tidy's output, including the dialogue messages that never make it to
  the existing report filters.
- Provides an opaque `TidyMessage` and an API that can be used to query against
  it to find the juicy goodness inside.
  - For example, `tidyGetMessageOutput( tmessage )` will return the complete,
    localized message.
  - Another example, `tidyGetMessageLine( tmessage )` will return the line the
    message applies to.
- You can also get information about the individual arguments that make up a
  message. By using the `tidyGetMessageArguments( tmessage )` itorator and
  `tidyGetNextMessageArgument` you will obtain an opaque `TidyMessageArgument`
  which has its own interrogation API. For example:
    - tidyGetArgType( tmessage, &iterator );
    - tidyGetArgFormat( tmessage, &iterator );
    - tidyGetArgValueString( tmessage, &iterator );
    - …and so on.

Other major changes include refactoring `messages.c` to use the new message
"object" directly when emitting messages to the console or output sinks. This
allowed replacement of a lot of specialized functions with generalized ones.

Some of this generalizing involved modifications to the `language_xx.h` header
files, and these are all positive improvements even without the above changes.
2017-03-13 13:28:57 -04:00
Jim Derry 4dc8a2cf9a Bump version to 5.5.5 for this fiasco, and fix poor planning and unfortunate
merge.
  - Sort all of the existing options and re-indent per Tidy standards. This is
    simply for cosmetic effect.
  - Allow the iterator to return all options again, even "internal" options.
    Things are too embedded with N_TIDY_OPTIONS, etc., to try to hide them.
  - Instead, simply add documentation to LibTidy users that they shouldn't use
    internal options.
  - Also added `TidyInternalCategory` to `TidyConfigCategory` without adding a
    new field to the struct. API users should check for this category before
    use.
  - Defined a two character macro for `TidyInternalCategory` for use in
    `option_defs[]`.
  - Changed struct `option_defs[]` to reflect the new category for affected
    options.
  - Removed string indicating * refers to internal options, since it no longer
    applies.
  - Regen'd all strings for previous point.
  - `tidy.c` now checks for `TidyInternalCategory` everywhere in order to
    suppress output.
2017-03-10 09:13:21 -05:00
Jim Derry 81b8ec0c90 Provide hot fix for stupid iterator errors. 2017-03-09 19:58:43 -05:00
Jim Derry ac242e9ea4 hotfix 2017-03-09 19:56:16 -05:00
Jim Derry f88328b893 hotfix 2017-03-09 19:13:45 -05:00
Jim Derry b0bd27e9c1 Bump to 5.5.4 2017-03-09 13:01:39 -05:00
Jim Derry cca276673c Merge branch 'issue_472' into next 2017-03-09 13:00:37 -05:00
Jim Derry e27cc262fe Bring the local vars into the context, which is allowed in C89. 2017-03-09 12:44:48 -05:00
Jim Derry f9f908b70a Addresses #492. 2017-03-08 16:53:59 -05:00
Jim Derry 005127c733 Address issue #472. 2017-03-08 15:37:01 -05:00
Jim Derry b047e32a18 Bump to 5.5.3. 2017-03-07 20:18:06 -05:00
Jim Derry 978756a482 Restore the previous status of gnu-emacs-file
- Updated strings files to match.
- Inhibit internal options from being output via the iterator. Internals should
  never have the chance to be exposed if they shouldn't be use.
- Added tidySetEmacsFile() and TidyGetEmacsFile() to the public API, and use it
  instead of secret API to set the filename in the console application.

The end result is that `gnu-emacs-file` (and also `doctype-mode`) officially no
longer exist to CLI users nor to API users, and tidy console behaves properly
by using a published API to set the filename for emacs.
2017-03-07 20:11:31 -05:00
Jim Derry 1ebae18c9a Bump to 5.5.2 2017-03-06 17:09:33 -05:00
Jim Derry 50ff29af54 Applied fix to eqconfig as well, which solves the man page generation issue. 2017-03-06 17:08:32 -05:00
Jim Derry 0572072148 Make sure that -xml-help uses localized names instead of format specifiers. 2017-03-06 12:12:39 -05:00
Jim Derry b5885dee46 Bump to version 5.5.1. 2017-03-06 07:07:40 -05:00
Jim Derry f3e3e1708b Merge branch 'clean_deprecations' into next 2017-03-06 07:06:28 -05:00
Geoff McLane 906f2e7f49 ignore msvc140 *.VC.db 2017-03-05 16:27:19 +01:00
Jim Derry 03f0192f51 How did this get back in there??? 2017-03-04 15:31:25 -05:00
Jim Derry 432f43dd2f Corrected description of pointer operator-macro order. 2017-03-03 07:17:28 -05:00
Jim Derry 74a4fa4049 Merge branch 'next' into clean_deprecations 2017-03-02 11:40:14 -05:00
Jim Derry ab183b8ae5 Merge pull request #503 from htacg/messages_squashed
Messages squashed
2017-03-02 09:39:19 -05:00
Jim Derry 3be515b1f9 Merge branch 'next' into messages_squashed 2017-03-02 09:34:58 -05:00
Jim Derry 92621d6f99 MSVC Compatibility
- Changed location of pointer operator in declarations.
  - Updated `CODESTYLE.md` to reflect this.
  - Updated `API_AND_NAMESPACE.md` to reflect this.
2017-03-02 09:32:02 -05:00
Geoff McLane 3e23225288 version.txt - Bump to 5.5.0 in next 2017-03-01 15:33:22 +01:00
Geoff McLane 0016e00835 Update verhist.log to 5.4.0 release 2017-03-01 15:06:30 +01:00
Geoff McLane 17b33753ae version.txt - Update to 5.4.0 release 2017-03-01 15:04:22 +01:00
Geoff McLane c39b1cb423 Issue #498 - Bump to 5.3.21 for merge #502 2017-03-01 14:51:53 +01:00
Geoff McLane 323ddacf5d Merge pull request #502 from htacg/issue-498
Issue #498 - parser.c - if a <table> in a <table> just close. This fixes #498
2017-03-01 14:47:40 +01:00
Geoff McLane 6574225f14 Merge pull request #500 from htacg/readme_540
Update README documents with information for the upcoming 5.4.0 release.
2017-03-01 14:36:59 +01:00
Jim Derry bb2cb26372 Update README documents with information for the upcoming 5.4.0 release. 2017-02-24 14:30:42 -05:00
Geoff McLane a49890ee55 Issue #498 - parser.c - if a <table> in a <table> just close.
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.
2017-02-24 16:20:10 +01:00
Geoff McLane d07134140a Issue #497 - version.txt - Bump to 5.3.20 for this fix 2017-02-24 14:39:46 +01:00
Geoff McLane c4b5904e1c Issue #497 - lexer.c - Add comment for this PR @seaburg 2017-02-24 14:38:20 +01:00
Geoff McLane e44f4d1469 Merge pull request #497 from seaburg/fix_value_trimming
Fix leading white spaces trimming
2017-02-24 14:30:39 +01:00
Geoff McLane 13c92bce38 Issue #468 - version.txt - Bump to 5.3.19 for this fix 2017-02-23 16:29:44 +01:00