summaryrefslogtreecommitdiff
path: root/regress/usr.bin/mandoc/mdoc
AgeCommit message (Collapse)Author
2017-06-14improve rounding rules for scaling unitsIngo Schwarze
in horizontal orientation in the terminal formatter
2017-06-11churn caused by the new Mdocdate messages, no easy way to avoid this :(Ingo Schwarze
2017-06-11Do not issue the message "no blank before trailing delimiter" for .No.Ingo Schwarze
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@.
2017-06-10style message about missing blank before trailing delimiter;Ingo Schwarze
inspired by mdoclint(1), and jmc@ considers it useful
2017-05-30STYLE message about useless macros we don't want (Bt Tn Ud);Ingo Schwarze
not a WARNING because they don't endanger portability
2017-05-30fix formatting of intermediate punctuation in .LkIngo Schwarze
2017-05-30Macro argument quoting does not prevent recognition of punctuationIngo Schwarze
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.
2017-05-05Move .sp to the roff modules. Enough infrastructure is in placeIngo Schwarze
now that this actually saves code: -70 LOC.
2017-05-04Parser reorg:Ingo Schwarze
Generate the first node on the roff level: .br Fix some column numbers in diagnostic messages while here.
2017-04-28Delete .Pp right before the first .Sh and right before any .Ss,Ingo Schwarze
and warn about it; mdoclint(1) does so, and it makes sense.
2017-04-17test display of long URIsIngo Schwarze
2017-04-14adjust .Lk tests after groff and mandoc .Lk improvementsIngo Schwarze
2017-03-11In markdown, autolinks are dangerous. Different compilers disagreeIngo Schwarze
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.
2017-03-08Now that markdown output is tested for almost everything, test allIngo Schwarze
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.
2017-03-08According to the CommonMark specification, backslash escapesIngo Schwarze
and markdown markup do not work inside code spans.
2017-03-08.Bl -column never gets blank lines between rowsIngo Schwarze
2017-03-08enable -T markdown tests of filled displays and tagged listsIngo Schwarze
2017-03-07Escape blanks at the end of markdown linesIngo Schwarze
such that they don't look like output line breaks.
2017-03-07fix completely empty .Eo: no blank line wantedIngo Schwarze
2017-03-07fix spacing after empty .FlIngo Schwarze
2017-03-07implement .An -split and -nosplitIngo Schwarze
2017-03-07Fix .In formatting in the SYNOPSIS:Ingo Schwarze
No &zwnj; in the middle of **, please.
2017-03-06Using .Nd only makes sense in the NAME section.Ingo Schwarze
Warn if that macro occurs elsewhere. Triggered by a question from Dag-Erling Smoergrav <des @ FreeBSD>.
2017-03-06URIs need different escaping; reported by reyk@Ingo Schwarze
2017-03-05first batch of -T markdown testsIngo Schwarze
2011-12-04test some simple macros; written while working on -TmanIngo Schwarze
2017-02-17Use typographic quotes rather than '"' for .Rs %T (no change for -TasciiIngo Schwarze
output, of course). Patch from bentley@ in November 2014. This can be committed now because groff merged Anthony's patch yesterday. Simply committing myself because asking Anthony to go search for his two-year-old patch and have him discover that it had accumulated an average of (felt) two or three conflicts per line by now would have been mean, even if hilarious.
2017-02-17Many people have been complaining for a long time that ``...'' looksIngo Schwarze
ugly in -Tascii output. For that reason, bentley@ submitted patches to render "..." instead to groff in November 2014 (yes, more than two years ago). Carsten Kunze yesterday merged them for the upcoming groff-1.22.4 release. Yay! Consequently, do the same in mandoc: Render \(Lq and \(Rq (which are used for .Do, .Dq, .Lb, and .St) as '"' in -Tascii output. All other output modes including -Tutf8 remain unchanged.
2017-02-16Surprisingly, groff does not support scaling units in .Bl -columnIngo Schwarze
column width specifiers, so stop supporting them, too. As a side effect, this fixes an assertion failure that tb@ found with afl(1), triggered by: .Bl -column -4n
2017-02-16Fix block scoping error if an explicit block is broken by twoIngo Schwarze
implicit blocks (.Aq Bq Po .Pc) that left the outer breaker open and could in exceptional cases, like between .Bl and .It, cause tree corruption leading to NULL dereference. Found by tb@ with afl(1). While here, do not mark intermediate ENDBODY markers as broken.
2017-02-11new regression tests for mdoc_macro.c revs. 1.167-1.172Ingo Schwarze
2017-02-11remove a few Mdocdate that snuck inIngo Schwarze
2017-02-06one less groff-mandoc difference after mdoc_validate.c rev. 1.234Ingo Schwarze
2017-01-11Do text production for .Bt, .Ex, .Rv, .Ud at the validation stageIngo Schwarze
rather than in the formatters. Use NODE_NOSRC flag for .Lb and NODE_NOSRC and NODE_NOPRT for .St. Results in a more rigorous syntax tree and in 135 lines less code. This work was triggered by a question from Abhinav Upadhyay <er dot abhinav dot upadhyay at gmail dot com> (NetBSD) on discuss@.
2017-01-08Stricter validation of the NAME section, in particular:Ingo Schwarze
- require a comma between names - reject all other text nodes - reject all empty Nm below NAME, not only in the leading position - reject Nm after Nd
2016-12-28Make the second, section number argument of .Xr mandatory.Ingo Schwarze
In fact, we have been requiring it for many years. The only reason to not warn when it was missing was excessive traditionalism - it was optional in 4.4BSD.
2016-10-17test .Bl -tag without -width;Ingo Schwarze
related to mandoc/mdoc_term.c rev. 1.231 and to textproc/groff-1.22.3p3
2016-08-20When a mismatching end macro occurs while at least two nested blocksIngo Schwarze
are open, all except the innermost open block got a bogus MDOC_ENDED marker, in some situations triggering segfaults down the road which tb@ found with afl(1). Fix the logic error by figuring out up front whether an end macro has a matching body, and if it hasn't, don't mark any blocks as broken.
2016-08-20When scanning upwards for a column list to put a .Ta macro in,Ingo Schwarze
ignore body end markers of lists breaking other blocks. Fixing a logical error that caused a NULL deref found by tb@ with afl(1).
2016-08-20If a column list starts with implicit rows (that is, rows without .It)Ingo Schwarze
and roff-level nodes (e.g. tbl or eqn) follow, don't run into an assertion. Instead, wrap the roff-level nodes in their own row. Issue found by tb@ with afl(1).
2016-08-10regression tests for mdoc_validate.c revisions 1.219 and 1.220Ingo Schwarze
2015-12-01Cope with the changed order of warning and error messages caused by theIngo Schwarze
seperation of parsing and validation modules. I originally intended to mop this up when the parser reorg is complete, but since the work stalled a bit, i should not leave this lying around broken for weeks. Reminded by daniel@.
2015-10-30If a .Bd block has no arguments at all, drop the block and only keepIngo Schwarze
its contents. Removing a gratuitious difference to groff output found after a related bug report from krw@.
2015-10-17Very tricky diff to fix macro interpretation and spacing around tabsIngo Schwarze
in .Bl -column; it took me more than a day to get this right. Triggered by a loosely related bug report from tim@. The lesson for you is: Use .Ta macros in .Bl -column, avoid tabs, or you are in for surprises: The last word before a tab is not interpreted as a macro (unless there is a blank in between), the first word after a tab isn't either (unless there is a blank in between), and a blank after a tab causes a leading blank in the respective output cell. Yes, "blank", "tab", "blank tab" and "tab blank" all have different semantics; if you write code relying on that, good luck maintaining it afterwards...
2015-10-16test mixing of tabs with TaIngo Schwarze
2015-10-12Use "-" rather than "\(hy" for the heads of .Bl -dash and -hyphen lists.Ingo Schwarze
In UTF-8 output, that renders as ASCII HYPHEN-MINUS (U+002D) rather than HYPHEN (U+2010), which looks better and matches groff. In ASCII output, it makes no difference. Suggested by naddy@.
2015-09-21Trailing whitespace is significant when determining the width of a tagIngo Schwarze
in mdoc(7) .Bl -tag and man(7) .TP, but not in man(7) .IP. Quirk reported by Jan Stary <hans at stare dot cz> on ports@.
2015-09-14Remove the warning about children of .Vt blocks because actually,Ingo Schwarze
.Vt type global_variable No = Dv defined_constant ; is the best way to specify in the SYNOPSIS how a global variable is initialized in the rare case where that matters. Issue noticed by jmc@.
2015-04-05If a partial explicit block extending to the next input line followsIngo Schwarze
the end macro of a broken block, put all of it into the breaking block. Needed for example by mutella(1).
2015-04-05Arguments to end macros of broken partial explicit blocksIngo Schwarze
must go inside the breaking block. For example, in .It Ic cmd Oo .Ar optional_arg Oc Ar mandatory_arg the mandatory_arg is still inside the .It block. Used for example by mutella(1).