aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/mdoc
Commit message (Collapse)AuthorAgeFilesLines
* Wrap .Sh/.SH sections and .Ss/.SS subsections in HTML <section> elementsIngo Schwarze2019-03-012-0/+6
| | | | | | 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>.
* Remove the HTML title= attributes which harmed accessibility andIngo Schwarze2019-01-112-11/+10
| | | | | | | 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.
* Represent mdoc(7) .Pp (and .sp, and some SYNOPSIS and .Rs features)Ingo Schwarze2019-01-0729-25/+431
| | | | | | | | | | | | | | | | | | | by the <p> HTML element and use the html_fillmode() mechanism for .Bd -unfilled, just like it was done for man(7) earlier, finally getting rid both of the horrible <div class="Pp"></div> hack and of the worst HTML syntax violations caused by nested displays. Care is needed because in some situations, paragraphs have to remain open across several subsequent macros, whereas in other situations, they must get closed together with a block containing them. Some implementation details include: * Always close paragraphs before emitting HTML flow content. * Let html_close_paragraph() also close <pre> for extra safety. * Drop the old, now unused function print_paragraph(). * Minor adjustments in the top-level man(7) node formatter for symmetry. * Bugfix: .Ss heads suspend no-fill mode, even though .Ss doesn't end it. * Bugfix: give up on .Op semantic markup for now, see the comment.
* Test interaction of low-level roff(7) filling requests with .Bd in generalIngo Schwarze2019-01-047-13/+98
| | | | and filling in .Bd -centered in particular; related to mdoc_term.c rev. 1.372.
* Rename mandoc_getarg() to roff_getarg() and pass it the roff parserIngo Schwarze2018-12-2125-12/+341
| | | | | | | | | | | | | | | | | | 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.
* Clean up the validation of .Pp, .PP, .sp, and .br. Make sure allIngo Schwarze2018-12-042-2/+4
| | | | | | | | | | | | | | 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.
* fix wrong dateIngo Schwarze2018-02-072-2/+2
|
* Delete the "no blank before trailing delimiter" check from theIngo Schwarze2018-02-069-16/+1
| | | | | partial explicit macros. Leah Neukirchen <leah at vuxu dot org> rightfully points out that the check makes no sense for these macros.
* Remove the implicit display feature of .Lk because it was inconsistentIngo Schwarze2018-01-131-3/+2
| | | | | | | | | across output devices, counter-intuitive, and resulted in ugly output for many real-world manual pages. Always format even long links in-line. I already committed a similar change to groff. OK jmc@, bentley@, and the original author of the feature, Werner Lemberg <wl@gnu.org>.
* disable .Xr -Tlint test for now,Ingo Schwarze2017-07-281-0/+3
| | | | it causes too much trouble on non-OpenBSD systems
* Do not test .Xr here. It is not what this directory should focus on,Ingo Schwarze2017-07-286-30/+22
| | | | and it is causing too much trouble in -portable.
* Avoid cross reference to mandoc(1) because it may cause a messageIngo Schwarze2017-07-206-14/+14
| | | | | on other operating systems where mandoc is not installed, causing the test to fail in the portable test suite.
* test -diag -width and -inset -widthIngo Schwarze2017-07-169-14/+22
|
* Now that we have the -Wstyle message level, downgrade six warningsIngo Schwarze2017-07-067-16/+16
| | | | | | 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.
* Messages of the -Wbase level now print STYLE:. Since thisIngo Schwarze2017-07-04834-1805/+1641
| | | | | | | | 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.
* warn about some non-portable idioms in .Bl -column;Ingo Schwarze2017-06-297-8/+74
| | | | triggered by a question from Yuri Pankov (illumos)
* warn about .Ns macros that have no effect because they are followedIngo Schwarze2017-06-274-4/+21
| | | | by an isolated closing delimiter; inspired by mdoclint
* cope with changes in BASE messagesIngo Schwarze2017-06-25139-274/+415
|
* style message about missing RCS ids; inspired by mdoclintIngo Schwarze2017-06-17139-0/+139
|
* improve rounding rules for scaling unitsIngo Schwarze2017-06-145-12/+12
| | | | in horizontal orientation in the terminal formatter
* Style message about legacy man(7) date format in mdoc(7) documentsIngo Schwarze2017-06-1147-0/+47
| | | | | and operating system dependent messages about missing or unexpected Mdocdate; inspired by mdoclint(1).
* Style message about legacy man(7) date format in mdoc(7) documentsIngo Schwarze2017-06-1188-0/+89
| | | | | and operating system dependent messages about missing or unexpected Mdocdate; inspired by mdoclint(1).
* Do not issue the message "no blank before trailing delimiter" for .No.Ingo Schwarze2017-06-111-1/+0
| | | | | | | In practice, that message only matters inside .Bf, and even there, it can occasionally be a false positive. In all other cases, it usually is a false positive, so it is better to drop it outright. Suggested by jmc@.
* add forgotten fileIngo Schwarze2017-06-111-0/+0
|
* fix order of messagesIngo Schwarze2017-06-111-1/+1
|
* style message about missing blank before trailing delimiter;Ingo Schwarze2017-06-10151-200/+402
| | | | inspired by mdoclint(1), and jmc@ considers it useful
* warning about unknown .Lb arguments; inspired by mdoclint(1)Ingo Schwarze2017-06-081-0/+2
|
* STYLE message about useless macros we don't want (Bt Tn Ud);Ingo Schwarze2017-05-302-0/+7
| | | | not a WARNING because they don't endanger portability
* fix formatting of intermediate punctuation in .LkIngo Schwarze2017-05-301-1/+1
|
* Macro argument quoting does not prevent recognition of punctuationIngo Schwarze2017-05-30115-134/+592
| | | | | | | | | | | and of called macros. This bug affects almost all macros, and fixing it simplifies the code. It is amazing that the bogus ARGS_QWORD feature got implemented in the first place, and then carrier along for more than eight years without anybody ever noticing that it was pointless. Reported by Leah Neukirchen <leah at vuxu dot org>, found on Void Linux.
* Move .sp to the roff modules. Enough infrastructure is in placeIngo Schwarze2017-05-051-1/+1
| | | | now that this actually saves code: -70 LOC.
* Parser reorg:Ingo Schwarze2017-05-041-1/+1
| | | | | Generate the first node on the roff level: .br Fix some column numbers in diagnostic messages while here.
* Delete .Pp right before the first .Sh and right before any .Ss,Ingo Schwarze2017-04-2810-4/+114
| | | | and warn about it; mdoclint(1) does so, and it makes sense.
* adjust tests to recent .Lk improvementsIngo Schwarze2017-04-176-8/+20
|
* In markdown, autolinks are dangerous. Different compilers disagreeIngo Schwarze2017-03-114-8/+8
| | | | | | | | | | | with respect to what constitutes a valid autolink, and if a compiler deems an autolink invalid, the input turns into an unintended and potentially harmful raw HTML tag. So, never write autolinks. Instead of <link>, write [link](link). Instead of <addr>, write [addr](mailto:addr). Issue pointed out by bentley@, who also agrees with the general direction of the change.
* Really commit some files that failed to get committed in this commit:Ingo Schwarze2017-03-0923-24/+5
| | | | | | | Now that markdown output is tested for almost everything, test all 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.
* Now that markdown output is tested for almost everything, test allIngo Schwarze2017-03-0842-52/+35
| | | | | | 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.
* According to the CommonMark specification, backslash escapesIngo Schwarze2017-03-085-5/+5
| | | | and markdown markup do not work inside code spans.
* .Bl -column never gets blank lines between rowsIngo Schwarze2017-03-083-1/+94
|
* add two result files that were forgottenIngo Schwarze2017-03-082-0/+63
|
* enable -T markdown tests of filled displays and tagged listsIngo Schwarze2017-03-0833-6/+1211
|
* Escape blanks at the end of markdown linesIngo Schwarze2017-03-071-1/+1
| | | | such that they don't look like output line breaks.
* fix completely empty .Eo: no blank line wantedIngo Schwarze2017-03-072-1/+36
|
* fix spacing after empty .FlIngo Schwarze2017-03-072-2/+2
|
* implement .An -split and -nosplitIngo Schwarze2017-03-074-1/+65
|
* Fix .In formatting in the SYNOPSIS:Ingo Schwarze2017-03-075-2/+79
| | | | No &zwnj; in the middle of **, please.
* Using .Nd only makes sense in the NAME section.Ingo Schwarze2017-03-061-0/+2
| | | | | Warn if that macro occurs elsewhere. Triggered by a question from Dag-Erling Smoergrav <des @ FreeBSD>.
* URIs need different escaping; reported by reyk@Ingo Schwarze2017-03-061-2/+2
|
* first batch of -T markdown testsIngo Schwarze2017-03-05231-8/+3706
|
* Use typographic quotes rather than '"' for .Rs %T (no change for -TasciiIngo Schwarze2017-02-175-0/+64
| | | | | output, of course). Patch from bentley@ in November 2014. This can be committed now because groff merged Anthony's patch yesterday.