summaryrefslogtreecommitdiffstats
path: root/regress/usr.bin/mandoc/man/RS (follow)
Commit message (Collapse)AuthorAgeFilesLines
* In HTML output, avoid printing a newline right after <pre>schwarze2020-10-161-12/+6
| | | | | | | | 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@.
* adapt to new <p> output logic (html.c rev. 1.131)schwarze2019-09-032-8/+4
|
* Finally, represent the man(7) .PP and .HP macros by the naturalschwarze2019-01-064-3/+55
| | | | | | | | | | | choice, which is <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.
* Slowly start doing more HTML output tests, in this case for theschwarze2019-01-054-12/+44
| | | | | | | | | | | | | | | | | | | 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.
* Rename mandoc_getarg() to roff_getarg() and pass it the roff parserschwarze2018-12-213-13/+14
| | | | | | | | | | | | | | | | | | 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.
* Messages of the -Wbase level now print STYLE:. Since thisschwarze2017-07-0415-27/+34
| | | | | | | | 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.
* cope with changes in BASE messagesschwarze2017-06-254-4/+4
|
* churn related to the new style message about RCS idsschwarze2017-06-174-0/+4
|
* improve rounding rules for scaling unitsschwarze2017-06-141-2/+2
| | | | in horizontal orientation in the terminal formatter
* Partial support for the \n[an-margin] number register.schwarze2017-06-133-2/+43
| | | | | | | | | | | | | | | 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.
* On a new RS nesting level, the saved width starts from the defaultschwarze2015-04-062-2/+18
| | | | | width, not from the saved width of the previous level. Improves xterm(1) and XSetEventQueueOwner(3); found in transcode_filter(1).
* Use the default width for .RS without arguments.schwarze2015-04-063-2/+43
| | | | | Reduces groff-mandoc differences in base and Xenocara by about 4%. Found while looking at wpa_supplicant(8).
* Fix a quirk with respect to empty .HP.schwarze2015-04-042-4/+15
| | | | | Found while writing a regression test for man_macro.c rev. 1.66. Incidentally, this brings rendering of XFreeEventData(3) closer to groff.
* better error reporting regarding .OP .RS .UR .TH argumentsschwarze2015-02-062-1/+2
|
* Delete the legacy generic warning type MANDOCERR_ARGCWARN,schwarze2015-02-062-2/+3
| | | | | replacing the last instances by more specific warnings. Improved functionality, minus 50 lines of code.
* preserve .PP before .RE; effect found in audio/pms(1)schwarze2015-01-242-0/+8
|
* Support .RE with an argument; needed for audio/pms(1).schwarze2015-01-247-17/+111
|
* For .RS, we need to save the information how much we actually indentedschwarze2014-12-242-0/+8
| | | | | | | because negative indents can get truncated, in which case we no longer know how to restore the original indent at the end of the block. This also solves another case of effectively infinite output found by jsg@ with afl, triggered by very large negative indents.
* support negative horizontal widths in man(7);schwarze2014-12-232-4/+20
| | | | minus twenty lines of code in spite of enhanced functionality
* inevitable churn caused by the section title changeschwarze2014-08-268-8/+8
|
* When the first child of the node being validated gets deleted duringschwarze2014-08-184-3/+43
| | | | | | | | | | | | | | | | | validation, man_node_unlink() switches to MAN_NEXT_CHILD. After that, we have to switch back to MAN_NEXT_SIBLING after completing validation, or subsequent parsing would add content into an already closed node, clobbering potentially existing children, causing information loss and a memory leak. Bug found by kristaps@ with valgrind in groff(7) on Mac OS X. Note that the switch back must be conditional, for if the node being validated itself gets deleted, we must *not* go to MAN_NEXT_SIBLING, which would not only yield wrong results in general but also crash in malformed manuals having an empty paragraph before the first .SH, for example OpenBSD c++filt(1). While here, add the missing <sys/types.h> as required before mandoc.h.
* Clean up ERROR messages related to document structure and macros:schwarze2014-07-075-2/+30
| | | | Hierarchical naming and mention macro names in messages.
* when indenting, extend the right margin accordingly, when needed;schwarze2014-02-163-2/+30
| | | | fixes a crash reported by blambert@ and a few other, similar ones
* In the parser, when closing an explicit block that is not open,schwarze2013-11-113-2/+46
| | | | | | | | close below-subsection implicit scopes that may still be open. In the formatter, make sure indentation is reset when leaving a scope, not only when entering the next one. Improves the formatting of gpg(1); issue reported by jca on ports.
* In literal mode (.nf), each input line must be kept togetherschwarze2013-01-053-2/+40
| | | | | | | | | | on the same output line, even if it is longer than the output width. This commit fixes a bug allowing an overly long last line of an indented block (.RS) to be broken even in literal mode. The bug was found using the sudo_plugin(4) manual provided by millert@. I introduced the bug in rev. 1.84 during the g2k12 Budapest hackathon.
* Correct indentation for lists and displays inside lists.schwarze2012-11-183-2/+70
| | | | | | | Inspired by a diff from millert@, but implemented rather differently and with slightly better functionality. In particular, this one respects -offset and -width arguments found in the input file.
* enable more tests, some were forgotten along the wayschwarze2012-07-183-2/+34
|
* Add a test for RS breaking some other block.schwarze2012-07-073-0/+49
Unfortunately, the code triggering the assert fixed in man_macro.c rev. 1.37 must be commented out because groff misformats the invalid input so badly that imitating it really makes no sense.