Modify the build system to assume config files by default. Modify tidyplatform
to accomodate these changes. Reformat tidyplatform for friendliness to new
developers.
- 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 remainder of the callbacks. TidyConfigCallback is now given a reference
to the instance of the TidyDoc that caused the callback to occur.
+ TidyConfigCallback
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
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.
This PR refactors how picklists and option parsers are implemented in LibTidy,
making is vastly easier to implement new picklists in the future, as well as
modify some of the existing picklists such that they have more logical names.
Picklist arrays are now arrays of structures that include the possible strings
capable of setting a particular option value, and a new parser has been written
to work with these structures.
In addition, several of the existing parsers were removed, as they are now
redundant, and a couple of the remaining parsers were refactored to take
advantage of the new parser.
In effect, this means that:
- New parsers don't have to be written in the majority of cases where new
options are added that exceed yes/no/auto.
- Some of the existing options can have more meaningful names than yes/no/auto,
in a backward compatible way. For example, vertical-spacing "auto" currently
in no way reflects "auto" when used.
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.
- 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.
- TidySlideStyle
- TidyBurstSlides
- Added documentation for TidyEmacsFile, since it's a valid option.
- Because TidyEmacsFile is a valid option, tweaked tidy.c so that it can
be specified in a configuration file without being overwritten by the console
app. Why a user might do this is dumb, but who are we to stop them.
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.