| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
whatsoever and ends with a broken next-line scope. Obviously, this
cannot happen in a real manual page, but mandoc(1) should not die
even when fed absurd input.
This bug was independently reported by both jsg@ and tb@ who both
found it with afl(1).
|
|
|
|
| |
output that are no longer printed since man_term.c rev. 1.236
|
|
|
|
|
|
|
|
| |
and right before </pre> because that resulted in vertical
whitespace not requested by the manual page author.
Formatting bug reported by
Aman Verma <amanraoverma plus vim at gmail dot com> on discuss@.
|
|
|
|
|
|
|
|
| |
one element next-line scope, the MAN_ELINE flag must not yet be
cleared if the parent macro is another element macro having next-line
scope, or an assertion failure is caused if all this is wrapped in
another macro that has block next-line scope, for example .TP.
Bug found in an afl run performed by Jan Schreiber <jes at posteo dot de>.
|
|
|
|
| |
after getting rid of the "copyless" crutch
|
|
|
|
|
|
|
|
|
| |
and reserve the character '~' for that purpose.
Bug found by validator.w3.org in openssl(1), which contains both a
tag "tls1_2" and a second instance of a tag "tls1", which also resulted
in "tls1_2", causing a clash. Now, the second instance of "tls1" is
rendered as "tls1~2" instead, employing the newly reserved '~'.
|
|
|
|
| |
in the same way as it was done for .Sh and .Ss in mdoc(7)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in tag.{h,c} and {mdoc,man}_validate.c
and into a formatting part including command line argument checking
in term_tag.{h,c}, html.c, and {mdoc|man}_{term|html}.c.
Immediate functional benefits include:
* Improved prioritization of automatic tags for .Em and .Sy.
* Avoiding bogus automatic tags when .Em, .Fn, or .Sy are explicitly tagged.
* Explicit tagging of .Er and .Fl now works in HTML output.
* Automatic tagging of .IP and .TP now works in HTML output.
But mainly, this patch provides clean earth to build further improvements on.
Technical changes:
* Main program: Write a tag file for ASCII and UTF-8 output only.
* All formatters: There is no more need to delay writing the tags.
* mdoc(7)+man(7) formatters: No more need for elaborate syntax tree inspection.
* HTML formatter: If available, use the "string" attribute as the tag.
* HTML formatter: New function to write permalinks, to reduce code duplication.
Style cleanup in the vicinity while here:
* mdoc(7) terminal formatter: To set up bold font for children,
defer to termp_bold_pre() rather than calling term_fontpush() manually.
* mdoc(7) terminal formatter: Garbage collect some duplicate functions.
* mdoc(7) HTML formatter: Unify <code> handling, delete redundant functions.
* Where possible, use switch statements rather than if cascades.
* Get rid of some more Yoda notation.
The necessity for such changes was first discussed with kn@, but i didn't
bother him with a request to review the resulting -673/+782 line patch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
they are skipped when looking for previous or following high-level
macros. Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm
and .Tg, and man(7) .DT and .PD. Use this concept for a variety
of improved decisions in various validators and formatters.
While here,
* remove a few const qualifiers on struct arguments that caused trouble;
* get rid of some more Yoda notation in the vicinity;
* and apply some other stylistic improvements in the vicinity.
I found this class of issues while considering .Tg patches from kn@.
|
|
|
|
|
|
|
|
| |
without an argument, use the empty string, and always concatenate
all arguments, no matter their number.
This allows reducing the number of arguments of mandoc_normdate()
and some other simplifications, at the same time polishing some
error messages by adding the name of the macro in question.
|
|
|
|
|
|
| |
no longer exist and NROFF/NOPTS were replaced with GROFF/GOPTS.
This doesn't change how things work in the protable version
of the test suite.
|
| |
|
|
|
|
|
|
| |
as recommended for accessibility by the HTML 5 standard.
Triggered by a similar, but slightly different suggestion
from Laura Morales <lauretas at mail dot com>.
|
|
|
|
|
|
|
| |
violated the principle of separation of content and presentation.
Instead, implement the tooltips purely in CSS.
Thanks to John Gardner <gardnerjohng at gmail dot com> for
suggesting most of the styling in the new ::before rules.
|
|
|
|
|
|
|
|
|
|
|
| |
choice, which is the <p> HTML element. On top of the previous
fill-mode improvements, the key to making this possible is to
automatically close the <p> when required: before headers, subsequent
paragraphs, lists, indented blocks, synopsis blocks, tbl(7) blocks,
and before blocks using no-fill mode.
In man(7) documents, represent the .sp request by a blank line in
no-fill mode and in the same way as .PP in fill mode.
|
|
|
|
|
| |
1. After the last child; the parent will take care of the line break.
2. At the .YS macro; the end of the preceding .SY already broke the line.
|
|
|
|
| |
the output line gets broken after the head. Do the same.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interaction of .nf and .RS, related to man_macro.c rev. 1.106.
HTML regression testing is tricky because it is extremely prone to
over-testing, i.e. unintentional testing for volatile formatting
details which are irrelevant for deciding whether the HTML output
is good or bad. Minor changes to the formatter - which is still
heavily under development - might result in the necessity to
repeatedly adjust many test cases.
Then again, HTML syntax rules are so complicated that without
regression testing, the risk is simply too high that later changes
will re-introduce issues that were already fixed earlier. Let's
just try to design the tests very carefully in such a way that
the *.out_html files contain nothing that is likely to change, and
defer testing in cases where the HTML output is not yet clean enough
to allow designing tests in such a way.
|
|
|
|
| |
related to man_validate.c rev. 1.145
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
struct as an argument such that after copy-in, it can call roff_expand()
once again, which used to be called roff_res() before this. This
fixes a subtle low-level roff(7) parsing bug reported by Fabio
Scotoni <fabio at esse dot ch> in the 4.4BSD-Lite2 mdoc.samples(7)
manual page, because that page used an escaped escape sequence in
a macro argument.
To expand escaped escape sequences in quoted mdoc(7) arguments, too,
stop bypassing the call to roff_getarg() in mdoc_argv.c, function args()
for this case. This does not solve the case of escaped escape sequences
in quoted .Bl -column phrases yet.
Because roff_expand() can make the string longer, roff_getarg() can no
longer operate in-place but needs to malloc(3) the returned string.
In the high-level parsers, free(3) that string after processing it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
combinations are handled, and are handled in a systematic manner.
This resolves some erratic duplicate handling, handles a number of
missing cases, and improves diagnostics in various respects.
Move validation of .br and .sp to the roff validation module
rather than doing that twice in the mdoc and man validation modules.
Move the node relinking function to the roff library where it belongs.
In validation functions, only look at the node itself, at previous
nodes, and at descendants, not at following nodes or ancestors,
such that only nodes are inspected which are already validated.
|
|
|
|
|
|
| |
to the standard forms (Pp, Ft, PP) up front, such that later code
does not need to look for the obsolete versions.
This reduces the risk of incomplete handling.
|
|
|
|
| |
used for example in the ditroff(7) manual of the groff package
|
|
|
|
|
|
| |
that are not syntax mistakes and that do not cause wrong formatting
or content to style suggestions.
Also upgrade two warnings that may cause information loss to errors.
|
|
|
|
|
|
|
|
| |
causes horrible churn anyway, profit of the opportunity to stop
excessive testing, such that this is hopefully the last instance
of such churn. Consistently use OpenBSD RCS tags, blank .Os,
blank fourth .TH argument, and Mdocdate like everywhere else.
Use -Ios=OpenBSD for platform-independent predictable output.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
in horizontal orientation in the terminal formatter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Manuals autogenerated from reStructuredText are reckless enough
to peek at this non-portable, implementation-dependent, highly
groff-specific internal register - for no good reason, because the
man(7) language natively provides in a much simpler way what they
are trying to emulate here with much fragility.
A full implementation would be very hard because it would require
access to output-device-specific formatting data at the roff(7)
preprocessor stage, which mandoc doesn't support at all.
So hardcode a few magic numbers as reStructuredText expects them
for terminal output. For other output modes (like HTML), code using
this register is utterly broken anyway.
|
|
|
|
| |
strange groff edge case behaviour found in multimedia/mjpegtools
|
|
|
|
| |
now that this actually saves code: -70 LOC.
|
|
|
|
|
|
| |
input files in -T markdown output mode by default and only mark
those files with SKIP_MARKDOWN that are not to be tested.
Much easier to read, and almost minus 40 lines of Makefile code.
|
| |
|
|
|
|
|
| |
Both kristaps@ and wiz@ repeated asked for this,
literally for years.
|
|
|
|
|
|
|
| |
It has not been used or maintained for several years,
and we won't start using it now.
Devlopment regression testing is done in OpenBSD, and
there is no value in maintaining two regression suites in parallel.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|