summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* It's annoying that people keep writing URIs including redundant partsIngo Schwarze2017-03-152-3/+43
| | | | | like "/OpenBSD-current/manN/". To discourage that, let man.cgi(8) redirect search form results to nice, concise URIs.
* Slightly increase widths calculated from string lengths (mainlyIngo Schwarze2017-03-142-1/+4
| | | | | | | | | | for .Bl -tag lists and SYNOPSIS .Nm blocks), such that the text still fits even if it is printed in bold font. This is an ugly band aid - but implementing font-dependent width measurements would be a major project and even more difficult for HTML than for PostScript. Issue reported by Jan Stary <hans at stare dot cz>.
* Port ctags-style, less(1) :t internal searching from terminal outputIngo Schwarze2017-03-132-10/+85
| | | | | | | | | | to HTML output. For certain macros appearing at the beginning of .It heads, write HTML id="..." attributes such that deep linking works. Write HTML <a> attributes such that you can easily copy out link targets with the mouse. Try: http://man.openbsd.org/vmctl.8#create Feature suggested by <guettliml at Thomas dash Guettler dot de>, some details of the design and implementation by me.
* Print title="..." in addition to id="..." attributes for macro keysIngo Schwarze2017-03-133-47/+59
| | | | | that can be searched for by apropos(1), such that you see the semantic function in a tooltip when hovering with the mouse.
* test infinite recursion in eqn(7) "define" statementsIngo Schwarze2017-03-114-2/+51
|
* Improve detection of recursive eqn(7) "define" statements:Ingo Schwarze2017-03-111-2/+7
| | | | | | Do not only catch "define key 'key other stuff'", but also "define key 'other stuff key'". Fixing infinite loop found by tb@ with afl(1).
* In markdown, autolinks are dangerous. Different compilers disagreeIngo Schwarze2017-03-115-29/+56
| | | | | | | | | | | 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-0925-24/+7
| | | | | | | 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.
* Fix blunder in previous: we must keep the line parse bufferIngo Schwarze2017-03-091-0/+2
| | | | | | | | consistent even when aborting the parsing of the line. That buffer is not our own, but owned and reused by mparse_buf_r(), read.c. Returning without cleanup leaked memory and caused write overruns of the old, typically much smaller buffer in mparse_buf_r(). Promptly noticed by tb@ with afl(1), using MALLOC_OPTIONS=C.
* Now that markdown output is tested for almost everything, test allIngo Schwarze2017-03-0846-55/+46
| | | | | | 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.
* Document that -T markdown produces ASCII output, and the impliedIngo Schwarze2017-03-081-0/+10
| | | | | | | | limitations. Of course, we could write UTF-8 output instead, but even the CommonMark specification doesn't require parsers to support that, so portability would be doubtful. While here, provide a link to the CommonMark specification.
* The CommonMark specification wants that opening parenthesesIngo Schwarze2017-03-081-9/+2
| | | | | inside link destinations be escaped. While here, remove the obsolete ESC_PAR.
* According to the CommonMark specification, backslash escapesIngo Schwarze2017-03-086-5/+9
| | | | and markdown markup do not work inside code spans.
* The CommonMark specification allows list markers fo the form "number) "Ingo Schwarze2017-03-081-1/+1
| | | | | as well as "number. ", so escape closing parentheses after leading digits to improve portability.
* Do not increment .Bl -enum list markers beyond two digits.Ingo Schwarze2017-03-081-1/+3
| | | | | Otherwise, we would indent subsequent paragraphs less than the CommonMark specification requires, harming portability.
* .Bl -column never gets blank lines between rowsIngo Schwarze2017-03-084-2/+99
|
* 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
|
* Add a blank after ">" when quoting.Ingo Schwarze2017-03-081-1/+7
| | | | If is allowed by markdown syntax and more human-readable.
* prevent infinite recursion while expanding the argumentsIngo Schwarze2017-03-084-3/+23
| | | | of a user-defined macro; issue found by tb@ with afl(1)
* If a user-defined macro is aborted because it exceeds the stackIngo Schwarze2017-03-075-10/+43
| | | | | | | | | | | | | | | | | | | limit, usually due to infinite recursion, discard whatever remains in all those open stack levels. Otherwise, insane constructions like the following could generate macros of enormous size, causing mandoc(1) to die from memory exhaustion: .de m \" original macro definition .m \" recursion to blow up the stack .de m \" definition to be run during the call of .m marked (*) very long plain text (some kilobytes) .m \" expand the above a thousand times while unwinding the stack .. \" end of the original definition .m \" (*) recursively generate a ridiculously large macro .. \" end of recursively generated definition .m \" execute the giant macro, exhausting memory Very creative abuse found by tb@ with afl(1).
* Escape blanks at the end of markdown linesIngo Schwarze2017-03-072-12/+23
| | | | such that they don't look like output line breaks.
* fix completely empty .Eo: no blank line wantedIngo Schwarze2017-03-073-9/+40
|
* fix spacing after empty .FlIngo Schwarze2017-03-073-3/+13
|
* implement .An -split and -nosplitIngo Schwarze2017-03-075-2/+95
|
* Fix .In formatting in the SYNOPSIS:Ingo Schwarze2017-03-076-11/+85
| | | | No &zwnj; in the middle of **, please.
* Using .Nd only makes sense in the NAME section.Ingo Schwarze2017-03-065-0/+16
| | | | | 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-062-5/+14
|
* first batch of -T markdown testsIngo Schwarze2017-03-05231-8/+3706
|
* Infrastructure for -T markdown tests.Ingo Schwarze2017-03-052-5/+37
| | | | | | This is needed because -T marksdown is expected to receive less maintenance than -T ascii, so we need automation to make sure that regular parser maintenance doesn't break this output mode.
* Remove a redundant condition in .%T handling, no functional change.Ingo Schwarze2017-03-042-8/+4
| | | | Found by jsg@ with scan-build.
* Make the description of -K autodetection easer to understand.Ingo Schwarze2017-03-041-11/+19
| | | | Basic idea suggested by jmc@, OK jmc@.
* Debian needs relative symlinks not only for manual pages,Ingo Schwarze2017-03-043-13/+23
| | | | | | but also for program files. Issue reported by Michael <Stapelberg at debian dot org> and by Markus <Waldeck at gmx dot de>.
* Markdown output mode helped us to find the first parser bug (as such,Ingo Schwarze2017-03-031-8/+9
| | | | | | | | | | this bug could cause wrong output in other modes as well): Do not misinterpret tab characters as .Ta macros when they appear on non-column .It lines in non-column .Bl lists that are nested inside a parent .Bl -column list. (Admittedly, such constructions are not very useful; don't use them!) Found by tb@ with afl(1) because the resulting tree corruption triggered an assertion in the markdown output module.
* new -mdoc -Tmarkdown output mode; OK millert@ reyk@ tb@;Ingo Schwarze2017-03-036-9/+1490
| | | | thanks to reyk@ and to Vsevolod at FreeBSD for suggesting it
* remove a few redundant conditions that jsg@ found with cppcheckIngo Schwarze2017-03-034-4/+4
|
* Fix a copy-and-paste error that caused man(7) manuals withoutIngo Schwarze2017-03-031-1/+1
| | | | | a section number in .TH to be misinterpreted as preformatted. Found by jsg@ with cppcheck.
* A missing initialization could randomly cause regular expressionIngo Schwarze2017-03-031-0/+1
| | | | | searches to be case-insensitive that ought to be case sensitive. Found by jsg@ with scan-build.
* Fix previous: do not access the byte before the string if the stringIngo Schwarze2017-03-031-1/+1
| | | | is empty; found by jsg@ with afl(1).
* Pledge man.cgi(8).Ingo Schwarze2017-02-221-0/+16
| | | | | Based on a more complicated patch from semarie@. Sebastien and tb@ both agree with the simplification.
* Since SQLite is gone, we no longer need the "flock" pledge.Ingo Schwarze2017-02-221-2/+2
| | | | Patch from semarie@, OK tb@.
* Handle an odd edge case where .It is preceded by .Sm.Ingo Schwarze2017-02-221-0/+1
| | | | | NULL dereference in man.cgi reported by Gabriel Guzman <gabe at guzman dash nunez dot com> on misc@.
* Debian wants relative, not absolute symlinks for man pages;Ingo Schwarze2017-02-221-2/+1
| | | | suggested by Michael Stapelberg
* fix spelling error;Ingo Schwarze2017-02-211-1/+1
| | | | found by Michael <Stapelberg at debian dot org> with Lintian
* release 1.14.1VERSION.1.14.1Ingo Schwarze2017-02-212-13/+21
|
* resolve trivial differences with OpenBSD:Ingo Schwarze2017-02-181-3/+1
| | | | | * we include <sys/types.h> for size_t, so we don't need <stdint.h> * sort declarations in read_whole_file()
* add some regress targetsIngo Schwarze2017-02-181-0/+28
|
* preconv_encode() can take a const input buffer;Ingo Schwarze2017-02-182-7/+7
| | | | diff from <christos at NetBSD>
* Provide an uninstall target, to help cleaning up after installingIngo Schwarze2017-02-181-7/+50
| | | | with the wrong DESTDIR. Use with care.
* proper test for O_DIRECTORYIngo Schwarze2017-02-186-10/+12
|