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.
- 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.
- Consolidated all output string definitions enums into `tidyenum.h`, which
is where they belong, and where they have proper visibility.
- Re-arranged `messages.c/h` with several comments useful to developers.
- Properly added the key lookup functions and the language localization
functions into tidy.h/tidylib.c with proper name-spacing.
- Previous point restored a *lot* of sanity to the #include pollution that's
been introduced in light of these.
- Note that opaque types have been (properly) introduced. Look at the updated
headers for `language.h`. In particular only an opaque structure is passed
outside of LibTidy, and so use TidyLangWindowsName and TidyLangPosixName
to poll these objects.
- Console application updated as a result of this.
- Removed dead code:
- void TY_(UnknownOption)( TidyDocImpl* doc, char c );
- void TY_(UnknownFile)( TidyDocImpl* doc, ctmbstr program, ctmbstr file );
- Redundant strings were removed with the removal of this dead code.
- Several enums were given fixed starting values. YOUR PROGRAMS SHOULD NEVER
depend on enum values. `TidyReportLevel` is an example of such.
- Some enums were removed as a result of this. `TidyReportLevel` now has
matching strings, so the redundant `TidyReportLevelStrings` was removed.
- All of the PO's and language header files were regenerated as a result of
the string cleanup and header cleanup.
- Made the interface to the library version and release date consistent.
- CMakeLists.txt now supports SUPPORT_CONSOLE_APP. The intention is to
be able to remove console-only code from LibTidy (for LibTidy users).
- Updated README/MESSAGES.md, which is *vastly* more simple now.
- No longer break script tags up on two lines if there is content. However
output is still subject to the `--wrap` behavior.
- Previous behavior intact if there is content.
Todo.
- Associate this with a new Tidy option.
Only deals with a successful case.
TODO: Maybe add a warning/error if the trailing surrogate not found, and
maybe consider substituting to avoid invalid utf-8 output.
result[6] is a fixed array of size 6, but in the process
of copying data into it, we clobber the last allocated byte.
Simplify some of the code by not calling redundant functions.
These services can only be used when there is a document loaded, ie a
lexer created. But really should not be calling a Clean and Repair
service with no doc!
According to the specs, each va_copy call should be matched by a va_end call
to ensure proper cleanup. Furthermore, since message filters might iterate
over the list of arguments, we should hand a new copy to each filter.
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.
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.
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.
- 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.
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.
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!
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.
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.
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.
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.
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.
- 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.