summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
Commit message (Collapse)AuthorAgeFilesLines
* Normalise SYNOPSIS behaviour after I gave up on following groff'sKristaps Dzonsons2010-06-071-60/+66
| | | | | | | | | | | | | | | | | | | | | inconsistent behaviour. In short: Some macros are displayed differently in the SYNOPSIS section, particularly Nm, Cd, Fd, Fn, Fo, In, Vt, and Ft. All of these macros are output on their own line. If two such dissimilar macros are pair-wise invoked (except for Ft before Fo or Fn), they are separated by a vertical space, unless in the case of Fo, Fn, and Ft, which are always separated by vertical space. Behaviour ok Jason McIntyre, ingo@. Fallout will be treated case-by-case. I had to clear out some regressions that were testing against groff's stranger behaviours: these will now break, as we don't care about such invocations. Also removed the newline for `Cd' invocation in a non-SYNOPSIS context.
* Fixed -Tascii and -Thtml rendering of `Ft' and `Fo'.Kristaps Dzonsons2010-06-061-13/+23
|
* Fix following the first: `Ft' is given special treatment if specified beforeKristaps Dzonsons2010-06-041-0/+4
| | | | `Fn'.
* Fixed `Fn' newline behaviour and added some regression tests to thisKristaps Dzonsons2010-06-041-1/+2
| | | | | | | extent. Documented `Fn'. Please note the COMPATIBILITY note regarding historic groff.
* Documented `In' in full.Kristaps Dzonsons2010-06-041-16/+4
| | | | | | Fixed `In' to behave properly: it wasn't properly breaking lines, formatting, or really anything else. Noted COMPATIBILITY with OpenBSD's groff, which pukes all over `In'.
* Fixed `Fd' to format in the right way. Found when confused by what theKristaps Dzonsons2010-06-041-12/+11
| | | | | hell `Fd' is supposed to do anyway (answer: it's a historical macro and we shouldn't be doing anything with it anyway).
* Consolidated list processing to a single loop in mdoc_validate.c. ThisKristaps Dzonsons2010-06-031-5/+4
| | | | | | | | | | relieves having to repeat running over the argument list in mdoc_action.c and mdoc_validate.c. Default to LIST_item for type-less lists (groff technically doesn't do this: it just ignores the `It' lines altogether). Make MANDOC_LISTTYPE be a recoverable error.
* Remove enum mdocargerr from phrase() (unused).Kristaps Dzonsons2010-05-311-0/+1
| | | | | | | | | | | | | | Add `Ta' macro, which is basically a NULL case everywhere but in mdoc_macro.c, where it closes out an existing `It' body scope and opens a new one, then continues parsing as in phrase() (TODO: merge these two?). Fix where scope-breaking was silently just dying instead of printing an error. Fix where trailing `Ta' or tab weren't creating a new MDOC_BODY context. We now support arbitrarily complex `It' contents for `Bl -column'.
* Migrate `Bl -column' phrases to be MDOC_BODY instead of MDOC_HEAD. ThisKristaps Dzonsons2010-05-301-22/+19
| | | | | | | | | | will make it easy for re-entrant parsing of `Ta' macros to fit in with standard closure rules. Added some more regressions for `Bl -column'. Note that one should fail, as documented in the TODO file. Recorded change of AST BNF in mdoc.3.
* Moved printing of empty word [back] into mdoc_action.c so that it's notKristaps Dzonsons2010-05-291-2/+0
| | | | mirrored across front-ends.
* Commit of patch floated on discuss@ a few days ago: if an in_line scopeKristaps Dzonsons2010-05-291-0/+2
| | | | | | | | | | has not been opened and closing punctuation is encountered AND the macro is marked as accepting no-content (or `Li'), then open an empty scope. Added regression tests for `Fl' and `Li' testing this behaviour. Also, squeeze hyph0.in tests into the last characters of each line so that groff doesn't hyphenate and break the test.
* Fix segfault in mixing old enum types for -Thtml -mdoc.Kristaps Dzonsons2010-05-241-2/+2
|
* Increase performance by stashing the list type in struct mdoc_node.Kristaps Dzonsons2010-05-171-79/+34
| | | | | | | This will eventually be used so that mdoc_macro can known whether to dump list line arguments into the body (`Bl -column' overflowing). Remove a2list() and arg_listtype() because of this.
* Enable the unified error/warning enumeration in mandoc.h that'sKristaps Dzonsons2010-05-171-2/+6
| | | | | | | | | | | stringified in main.c. Allow `An' to handle an argument and child (with a warning). Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a warning). Allow inconsistent column syntax to only raise a warning.
* Documented ie/el.Kristaps Dzonsons2010-05-171-2/+3
| | | | | Installing roff.7 and added it to index.sgml. Small fix for `D1' and `Bd' in -Thtml.
* LIBRARY can also occur in section 9.Kristaps Dzonsons2010-05-151-2/+2
| | | | | | All manual sections (unknown, 3p, 3f, etc.) correctly handled by -mdoc. Useful warning printed if unknown manual section. Checking for manual sections (e.g., LIBRARY) checks only first character, so 3p, 3f, etc. are free.
* Fixed bug in -Thtml -mdoc where `Lb' would line-break in LIBRARY section.Kristaps Dzonsons2010-05-131-6/+7
| | | | | Fixed assumption that parse-point == 1 equates to beginning of line (false if whitespace separates macro and control character). Fixed line-break for non-first-macro in several SYNOPSIS macros.
* Fixed %T: it now correctly underlines, instead of quoting (noted by Jason ↵Kristaps Dzonsons2010-04-081-10/+2
| | | | McIntyre and posted on Ingo Schwarze' mandoc-todo list).
* Bug in printing of reserved words with form \*[xxx] fixed (found by Joerg ↵Kristaps Dzonsons2010-04-071-0/+1
| | | | Sonnenberger).
* Let `Bl' accept arguments on the head line with a warning (these are ignored ↵Kristaps Dzonsons2010-04-061-0/+2
| | | | in the front-end device) (noted by Theo de Raadt).
* `Fl' now correctly suppresses the trailing space if followed by macros on ↵Kristaps Dzonsons2010-04-061-2/+2
| | | | the same line.
* Fix in `Mt' mailto from a patch by Tim van der Molen.Kristaps Dzonsons2010-04-051-36/+41
| | | | | Fixed PAIR_xxx_INIT macros -- this are to be unified. Have `Vt', `Fn', `Ft', and `Fo' print whitespace afterward, instead of before.
* Merged patch by Ingo Schwarze allowing `Xr' to pass through with no ↵Kristaps Dzonsons2010-04-031-0/+3
| | | | arguments (emits warning of course).
* Integrate Ingo Schwarze's patch for mdoc_iscdelim() (tri-state for opening ↵Kristaps Dzonsons2010-03-291-1/+1
| | | | | | | | | | | and closing macro punctuation). Modify blk_part_exp() to correctly handle leading punctuation before HEAD. Significantly clean up and document blk_part_exp(). Modify blk_part_imp() for to correctly handle leading punctuation before HEAD. Significantly clean up and document blk_part_imp(). Integrate Ingo Schwarze's patch for args() (using new mdoc_iscdelim() format). Documented bad `Ec' handling for later work in mdoc_term.c/mdoc_html.c.
* Fix in handling Vt in SYNOPSIS with trailing punctuation. Spotted by Joerg ↵Kristaps Dzonsons2010-01-301-2/+5
| | | | Sonnenberger.
* Fixed Makefile for `make lint' dep. on config.hKristaps Dzonsons2010-01-291-1/+1
| | | | Added -Txhtml for XHTML output (minimal increase to programme logic). Because groff has it and it bothers me that we don't.
* Big check-in of compatibility layer. This should work on most major ↵Kristaps Dzonsons2010-01-011-6/+8
| | | | architectures. Thanks to Joerg Sonnenberger.
* Documented `Fl' in mdoc.7.Kristaps Dzonsons2010-01-011-16/+4
| | | | Backed out stipulation that `Fl ""' is ignored: this is not the case in !OpenBSD groffs.
* `Fl' has each argument be in a separate scope (thanks Ingo Schwarze).Kristaps Dzonsons2010-01-011-3/+24
| | | | | Situation of `Fl [arg]* "" [arg]*' is fixed: empty arguments are ignored. Note that OpenBSD crashes when this happens. Situation of `Fl' is fixed wrt trailing whitespace.
* Fixed handling of exampledir (pointed out by Ulrich Sporlein, forgotten, ↵Kristaps Dzonsons2009-12-021-2/+2
| | | | discovered again).
* Enabled -Thtml -mdoc to work with \f (see compat notes in mandoc.1).Kristaps Dzonsons2009-11-161-3/+1
|
* Removed superfluous HTML_NEWLINE.Kristaps Dzonsons2009-11-141-6/+5
|
* Fixed -Thtml printing of -ohang lists (-mdoc).Kristaps Dzonsons2009-10-311-2/+5
| | | | Fixed validation of -ohang lists as having no widths.
* Patch on DragonFly BSD syntax (thanks Sascha Wildner).Kristaps Dzonsons2009-10-311-1/+1
| | | | Noted inclusion into DragonFly BSD (thanks Sascha Wildner).
* Using perror() instead of fprintf for failure from library functions.Kristaps Dzonsons2009-10-311-1/+1
|
* More lint fixes.Kristaps Dzonsons2009-10-301-3/+4
| | | | Removed err.h from inclusions (less main.c--still in progress).
* Fixed `sp', `br', `Pp', etc. so as not to have an empty div (-Thtml, -man, ↵Kristaps Dzonsons2009-10-281-9/+10
| | | | | | | | -mdoc). Made html_idcat be completely correct (messy standard) (-Thtml). Fixed warnings about -ohang and -item lists (-Thtml, -mdoc). Fixed typo in index.sgml.
* Fixed un-reset buffer in `.In', -Thtml, -mdoc.Kristaps Dzonsons2009-10-281-13/+15
| | | | Added html_id[cat,cpy] for transforming id's into well-formed attribute strings (no %s, etc.).
* Added "summary" tag to tables in order to silence HTML-tidy's complaints.Kristaps Dzonsons2009-10-271-4/+9
|
* Portability: replaced queue macros in html.c (Joerg Sonnenberger).Kristaps Dzonsons2009-10-261-6/+6
| | | | | Fixed "-o" residue. Added "-O" to usage() (-o didn't appear there either).
* Full `%U' support.Kristaps Dzonsons2009-10-261-17/+27
| | | | | | | `Lk' display fixed. Renamed arg2xxxx as a2xxxx for consistency. Renamed print_foot to print_man_foot for consistency. Removed default printing of `~' when `Lk' not provided (not sure where I got that from).
* Added `%U' to -mdoc (doesn't render in a nice way yet).Kristaps Dzonsons2009-10-241-0/+3
|
* Fixed maddening mismatch between groff and strftime mismatch of day ("%e"). ↵Kristaps Dzonsons2009-10-221-7/+3
| | | | Noted by Ulrich Sporlein.
* More updates to mdoc.7.Kristaps Dzonsons2009-10-201-5/+7
|
* Continued work on mdoc.7.Kristaps Dzonsons2009-10-191-0/+2
| | | | Noted buffer overwrite bug in -Thtml -mdoc (will fix later).
* Fixed -mdoc -Thtml with -item lists not to default-indent when width isn't ↵Kristaps Dzonsons2009-10-191-0/+2
| | | | | | specified. Many more cleanups to mdoc.7 (ongoing completion and documentation of all macros).
* Made sure devices and formats recognise that -man and -mdoc have different ↵Kristaps Dzonsons2009-10-181-5/+5
| | | | syntax for scaling widths: -mdoc assumes no unit means that the value is a string literal while -man instead uses the default vertical/horizontal scale.
* Added horizontal scaling units to -Tman -Tascii.Kristaps Dzonsons2009-10-181-0/+4
|
* Added support for `Bd -centered', which appears in newer groffs (not yet ↵Kristaps Dzonsons2009-10-151-0/+4
| | | | implemented in centre-capable front-ends, i.e., -Thtml).
* Moved output definitions into main.h.Kristaps Dzonsons2009-10-131-0/+1
| | | | Pushed terminal_{mdoc,man} into {mdoc,man}_term.c.