Commit graph

98 commits

Author SHA1 Message Date
Geoff McLane ea4ae0dd13 Is #679 - some fixes for -export-config 2018-02-19 03:21:04 +01:00
Jim Derry 6d6eb3797b Merge remote-tracking branch 'origin/keep-tabs' into complete_callbacks 2017-11-20 09:31:44 -05:00
Jim Derry 314690ad7f Option changed callback now implemented. 2017-11-20 09:27:59 -05:00
Jim Derry fcd4e90ea7 Fix issue where console app and API can't set an FPI for a doctype without
providing a quoted string. This is especially painful in a terminal, which
requires escaping quotes. Since all FPI's must start with + or -, this fixes
the issue.
2017-11-19 12:54:08 -05:00
Jim Derry ae20af4181 Added a new tidyOptionIsList() API service. 2017-11-19 12:02:24 -05:00
Jim Derry e7bacf2245 Allow all parsers to accept NULLSTR input for API consistency. 2017-11-17 21:30:19 -05:00
Jim Derry fec21eebba Merge branch 'next' into fix_doctype_option 2017-11-17 19:17:14 -05:00
Jim Derry 1dd85ad1c6 Restore alphabetical order to the options enums and structure. No version bump. 2017-11-17 19:16:58 -05:00
Jim Derry e6c891ea00 Doctype made no sense! It was a write-only property in some cases, and uses
itself and DoctypeMode to make up for Tidy's ability to store only a single
value for an option. It's a little bit special relative to every single other
option, in that it's declared as a string, but also has a picklist. This change
makes Doctype behave in the way every other Tidy option behaves, and treats
Doctype as a string, but also supports selection via the picklist.
2017-11-17 08:11:22 -05:00
Geoff McLane 2aeb2eeb7a Issue #403 - New 'keep-tabs' option to address this. 2017-11-03 19:16:17 +01:00
Geoff McLane 4b5c86ee47 Small fix to compile with MSVC10, exposed in #636
MSVC10 2010 enforces K&R C that all variables must be declared before code
in any given context.

Unable to fix a gcc option that will expose this...

modified: src/config.c
2017-11-02 18:47:18 +01:00
Jim Derry 5fb1138840 Fixed indentation. 2017-10-29 15:04:51 -04: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
Jim Derry 86e62dbb70 Remove unnecessary AdjustConfig logic. 2017-10-26 18:25:55 -04:00
Jim Derry 350f7b4af7 Replaced AdjustConfig() with TY_(AdjustConfig)() 2017-10-26 18:08:17 -04:00
Jim Derry aec686b1a9 Add a true "default" to TidyCSSPrefix so that it will be shown in documentation. 2017-10-26 14:24:35 -04:00
Jim Derry fc3cba86a8 I guess no one tried to use this before... it's been broken since the initial commit. We've been comparing the config value from a different option the whole time. 2017-10-25 15:04:49 -04:00
Jim Derry 4b1c048ee5 Correct configCallback logic fix. 2017-10-20 07:46:00 -04:00
Jim Derry 492c9fb74b Avoid short circuit evaluation to give new callback a chance to execute.
Version bump.
2017-10-19 20:11:26 -04:00
Jim Derry 1d91942960 Renamed the proposed squelch and squelch-id to mute and mute-id,
respectively. Updated matching cases in test branch accordingly.
2017-10-10 08:21:14 -04:00
Jim Derry 6f0ada7ffe Typo 2017-10-08 11:53:36 -04:00
Jim Derry ad03b28318 Remove @todo note. 2017-10-08 11:51:19 -04:00
Jim Derry e6f007d8ba Code spacing consistency. 2017-10-08 11:44:45 -04:00
Jim Derry f72c3d27e1 Show full prototype in forward declaration. 2017-10-08 11:40:53 -04:00
Jim Derry 626375346d Adds message squelching (muting) to Tidy, avoiding the need to specify a new
option every time we might want to allow or disallow new output. Adds two new
options:
  - `squelch-id` (default **no**) will provide tags during Tidy's output that
    can be used to silence warnings. For example, `MISSING_ENDTAG_OPTIONAL`
    will be shown after warnings of that type. Then in the future, the user can
    use...
  - `squelch` (default NULL) takes a list of message identification tags.
    Messages of this tag type will then be muted from output.

This gives the user great control over hiding things that he or she doesn't care
about seeing. However, muted errors/warnings still count toward error summaries.

If we merge this, then TidyShowMetaChange and TidyWarnPropAttrs are candidates
for removal (using the deprecation mechanism Tidy now has, these will continue
to work, though).
2017-10-08 10:47:03 -04:00
Jim Derry ab8a4249df Added squelch-id (TidySquelchShow) so that message ID's will be displayed in
the report output table. This can be used to show message ID's that the user
can use to filter against in the upcoming `squelch` option.
2017-10-07 18:10:46 -04:00
Jim Derry b31dd6fcc2 Added some internal structures and code to support the removal of config
options in the future, with full user notification. Right now this code is
dead, because no options have been removed. No version bump.
2017-10-07 16:11:51 -04:00
Jim Derry 2e4393e37b Works for -config files now, too. 2017-10-07 11:20:57 -04:00
Jim Derry 483d17e39b Experimentally working. 2017-10-07 11:04:18 -04:00
Jim Derry 2e2062ddec WIP with functioning concept. 2017-10-06 16:14:54 -04:00
Jim Derry 4e6d76eb01 Fixed broken option callback; version bump to reflect. 2017-10-06 09:41:54 -04:00
Jim Derry 4fa26f4f5d Affects documentation only: updates the manpage (and soon the quickref) by
breaking up the existing options into several more logical categories.
2017-10-04 12:24:07 -04:00
Jim Derry 8d7e5f7f5a Documentation formatting. 2017-10-03 15:30:21 -04:00
Jim Derry e41229749c TIDY_WIN32_MLANG_SUPPORT has been dead code for ages. Not tested, not maintained. 2017-10-03 14:24:01 -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 a1e4dcc066 Removed option for SUPPORT_ACCESSIBILITY_CHECKS, regen'd strings. 2017-10-03 12:45:34 -04:00
Jim Derry dfa2501928 Removed option for SUPPORT_ASIAN_ENCODINGS, and regen'd strings. 2017-10-03 12:37:23 -04:00
Jim Derry 2758939406 Removed SUPPORT_UTF16_ENCODINGS, and regen'd strings. 2017-10-03 12:26:38 -04:00
Jim Derry a4e0409323 Address #584
Modify the build system to assume config files by default. Modify tidyplatform
to accomodate these changes. Reformat tidyplatform for friendliness to new
developers.
2017-10-01 10:37:49 -04:00
Jim Derry df3bde38ec Introduced auto behavior to the fix-bad-comments option so that yes or
`no` could be applied automatically per the document type. This is the new
default.
2017-09-25 15:26:03 -04:00
Jim Derry 483e0fec9e Address issue #476, which started out as a simple message update.
- 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.
2017-09-24 18:15:40 -04:00
Jim Derry 64a4302e6c Migrated the attribute list parser to a general parser for future re-used by
other potential list-based options.
2017-09-23 07:30:17 -04:00
Jim Derry 23c28e5b82 Initial commit of #434; WIP 2017-09-22 22:14:59 -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 1562c42c2e Merge branch 'next' into issue-456
Manually fixed merge commits.
2017-08-28 15:17:10 -04:00
Jim Derry 561d43c7e5 Merge pull request #579 from htacg/issue-567-2
Issue 567 2 - style tag to head
2017-08-28 10:02:25 -04:00
Jim Derry f4c64966f0 Added TidyConfigCallback and deprecated TidyOptCallback for consistency with
the remainder of the callbacks. TidyConfigCallback is now given a reference
to the instance of the TidyDoc that caused the callback to occur.

+    TidyConfigCallback
2017-08-26 12:47:18 -04:00
Geoff McLane 50859e8258 Issue #567 - add option, messages, and fix node iteration.
Add option TidyStyleTags, --fix-style-tags, Bool, to turn off
this action.

Add warning messages MOVED_STYLE_TO_HEAD, and FOUND_STYLE_IN_BODY.

Fully iterate ALL nodes in the body, in search of style tags...

Changes to be committed:
	modified:   include/tidyenum.h
	modified:   src/clean.c
	modified:   src/config.c
	modified:   src/language_en.h
	modified:   src/message.c
2017-06-28 20:41:46 +02:00
Geoff McLane b32e14a8ea Issue #456 - add new option show-meta-change 2017-06-09 03:11:39 +02:00
Geoff McLane 8a932f96eb Issue #456 - Oops, incorrect merge conflict 2017-05-27 18:52:49 +02:00