Very minor repairs.
All of the functionality and stability for a v1 release is in place.
Make it so, number one!
Support native roff escapes instead of using Unicode escapes.
(This is a work in progress, as there are many.)
This makes special characters usable in sections and so on.
Fix a bogus free when running
While here, handle differences between totally-different
files, where before we would error out.
Document how differences are displayed in each output mode,
as well as how metadata is a special case.
Fix -tterm ANSI escape filtering for background
colour, allowing changes to be viewed again.
Fix a sneaky -tterm bug found by AFL where having
the number of footnotes change digit length (e.g., 9 to 10)
within a table would cause an assertion.
Another big thanks to Michael Dexter in providing hardware
for continuously running AFL and finding some of these
corner case bugs!
Have -tlatex process header identifiers, both automatically
generated and from PHP extra attributes. Allow linking to these
within the document body.
Have -tms print that an image happened instead of just omitting
it entirely. It now behaves like -tman in this regard.
Fix where -tterm would print double-spaces in certain
Have extended attribute classes apply as OpenDocument classes in
Add class and identifier extended attributes to headers. These are
stipulated in PHP Markdown Extra. Documentation in
When using header identifiers (the default) and the names collide,
use pandoc's method of creating unique header names. Also handle
the case of markup in headers and the identifier created from those
to also be like pandoc. This isn't a fix, but rather make output
consistent with other tools.
Fix output of how links are handled in -Tms when part of
headers. The same applies to other block-level macros with link
children such as in definition lists. This also cleans up how
headers are shown in the PDF TOC. While here, make header identifiers
the same as in -Thtml so that intra-document links are
consistent, and enable linking within a document using the PDF
Fix footnotes to be actual footnotes in -Tlatex and
-Tms instead of endnotes. The other formats (-Tman,
etc.) all continue to use endnotes. The note system has internally
been cleaned up and now allows for more flexible note placement,
Allow footnotes to properly exist in -Tlatex tables. Also
allow for table alignment.
Bump the minor number as the ABI has been tidied up with respect to
footnotes: they're now all in their
blocks instead of split into definitions and references.
LOWDOWN_DOC_FOOTER element, which was not used, has
also been removed.
The system in general has spent many, many computer-hours being
fuzzed with AFL
thanks to hardware donated by Michael Dexter. Thank you!
Finally, make -T be a synonym for the new -t, which is
used by pandoc.
flat OpenDocument output with -Tfodt.
This implements the
standard, and is readable at least on
This further implements -Tfodt change tracking in
It does not support images or definition lists yet.
Significantly improve -Tterm output, both in terms of styles
and layout. Terminal output styles are easy to set as compile-time
constants by editing
If you're going to edit this for a downstream installation of
lowdown, please let me know and I can stash it in a styles directory!
Add --term-no-ansi to disable all ANSI escapes in output.
This produces a clean, undecorated terminal-formatted document.
Expand support for images having PHP Extra attributes to both links
and images supporting classes, images, and the existing image attributes.
These applies to both reference and inline links.
This deprecates --parse-no-img-ext in favour of the more general
--parse-no-ext-attrs. The same applies to the library's
LOWDOWN_IMG_EXT deprecated by
Make sure that all standalone document metadata (e.g.,
css for HTML,
volume for manpages, etc.)
is properly escaped for its output context.
-X option (metadata extraction) now extracts the
unformatted version of the given key. This is because output media
don't necessarily have a single way of formatting data: in
-Thtml, for instance, metadata may be formatted differently
if it appears in links, attributes, or within HTML content. It's
now the caller's responsibility to escape the results of
This generates API changes, because metadata is now recorded during
the parse phase, not during the rendering phase. While here,
metadata extraction for
diff mode is disabled (as it should
While here, the
base level header metadata key has been
shift-heading-level-by. This is because the
base header level never actually worked properly,
and instead behaved like
Add GFM task lists to all output modes.
While doing this, clean up list output for -Tgemini and
Bug-fix: the --parse-no-intraemph flag would set the
condition (i.e., intra-emphasis was not parse) instead of unsetting
it. Now it does the correct thing.
Add support for
NO_COLOR and the flag version,
This only applies to -Tterm output when no in difference mode.
Fix a crash in -Tgemini with tables.
Allow for multi-page tables in -Tms.
Start to expand on regression suite.
Clean up documentation, when possible, and add some minor code polish.
Several fixes to -Tlatex smart typography (single quotes and
dashes). The smart typography now handles single quotes within
words. Lastly, fix a bug where footnotes started at two instead of
Fix tables as processed by the difference engine.
Tables are now fully opaque, which means that any changes will
result in the deletion and re-addition of the table.
This isn't a good fix, but it does mean that any tables run through
the difference engine will be sane for output.
Fix metadata to also be properly handled by both the difference engine
and conforming front-ends. This is a bit unusual since metadata is
both processed during parse and also affects document output, such
as in document title. For now use the same rule that front-ends
with metadata differences affecting document layout (e.g., title)
use the new form, if changed.
Lastly, fix footnote reference. When they're emitted in the new
document, the reference definitions are re-ordered in the correct
way to allow -Tms and such to work properly. While here,
make sure that all printed footnote numbers start at one and colours
are properly represented in output.
lowdown-diff(1) for easier reading.
Properly render tables for -Tgemini as fixed-width displays.
By default, render Gemini link labels using
(hexavigesimal) with the option of using Roman numerals
(--gemini-link-roman) or without labels at all
(--gemini-link-noref). This choice of default may change in
later versions, hwoever.
Add --term-nolinks to strip URLs out of terminal output (when
alternative text is available).
Then add --nroff-nolinks and --nroff-shortlinks, just
like those for -Tterm, for use with -Tman or
Fix long-standing kinda-bug where
www autolinks were
being reported as regular links instead of autolinks.
Introduce -m and -M, which allow metadata to be
provided on the command line.
Metadata keys are first looked for in -m, overriden by what's
in the document, and those overridden by what's in -M.
Remove the deprecated -D, -d, -E, and
-e, which were long ago replaced by long options.
Inhibit printing of metadata in -Tgemini unless
--gemini-metadata is given.
These are currently only used by -Tman.
Convert all internal functions to return an error
code on memory allocation failure.
Prior to this, these functions had a chance of exiting and printing
failure to stderr.
Now, this is left as the responsibility of the front-end.
There's no significant API change except that all renderers return a
Fix the difference engine in several subtle ways, improving the
produced scripts, and also fix crashes where similar text would
match multiple parts of the parse tree, resulting in assertions.
Re-write the -Tms and -Tman generator to use a
completely different internal algorithm.
This algorithm, instead of formatting directly into output, converts
the AST into an array of output blocks marked either as text,
literal, macro, or font/colour change.
An assembler for this array manages newlines and spacing between blocks.
This fixes all known instances of unexpected line breaks and allows
for significantly simplified handling of text interspersed with
macros (e.g., links, etc.).
An API result of this is that the tree passed to
Recognise non-block and block lists for -Tlatex output.
Emit a UTF-8 preconv header to all -Tms and -Tman so
that -Kutf8 need not be passed to the formatter.
Remove the --nroff-hardwrap option, which needlessly
complicates code without benefit.
Fix a crash introduced with the new UTF-8 handling in
section metadata key to set the manpage section
when used with -Tman.
Significantly clean up lists (definition, ordered, unordered) and
how indenting and compacting is handled in -Tman and
EE for block code when in
-Tman. These only apply in
mode. While looking at block codes, fix how much trailing space is
emitted and make sure that subsequent paragraphs are indented.
Don't have sections in -Tman be followed by superfluous
paragraph macros (
Have the -Tterm output correctly adjust columns for UTF-8
wide characters. This makes both ASCII and UTF-8 (e.g, Russian)
correctly align on terminal output.
Add support for the
protocol I've been hearing so much about.
This may now be used from
or as a library in
This is a very simple output:
it basically does no formatting at all, but does have some logic to
shuffle around links.
Bug-fix: don't emit stray
.PP macros when in
-Tman or -Tms mode.
This bug was introduced in version 0.7.3.
The library is now usable from C++ applications as-is, without
needing extra compilation flags.
Fix some smart typography bugs, specifically with ending single or
While doing so, create a regression suite for smart typography and
update the manpage.
Bug submitted by Larry Kollar, thanks!
base header level metadata key work properly.
Another bug submitted by Larry Kollar, thanks!
Fix --nroff-hard-wrap to emit trailing newlines.
Yet another bug submitted by Larry Kollar, thanks!
Larry further suggested using typographic conventions in both the
-Tlatex and -Tms output to have initial paragraphs
not indent, but subsequent ones should.
This is the default mode in LaTeX, which I was disabling.
I've now removed my override to be more like default LaTeX, and
Larry proposed an initial patch for having -Tms do the same.
Thanks yet again!
Invert logic of --parse-codeindent to be correct.
For -Tms, make numbered output the default.
This is because earlier, it was not possible to make numbered output
at all with --nroff-groff.
Also clarify the role of --no-groff while at it.
Add --latex-no-numbered to -Tlatex for symmetry with
Initial support for extended image attributes as in PHP Markdown
For the time being, these only allow for non-pixel widths and
heights for images.
Spend time in the documentation explaining image support, as it's a
little complicated: LaTeX and HTML support any images, but ms
only supports EPS and PS, and only in block mode.
(Among other complexities…)
Changes to internal API: the
structures have been renamed to
struct lowdown_doc and
First, I dislike typedefing away the fact that a variable is a
structure very much.
Second, the names were a holdover from the old system and shouldn't
be part of the exported API.
Add lowdown_buf_new(3) and
lowdown_buf_free(3) to make
the low-level library usable, where before it was pointing to
Simple support for LaTeX documents with -Tlatex.
This will be expanded in future versions, but for now gets most
documents having maths and graphics, too.
Significantly improve metadata handling.
Until now, metadata was handled inconsistently across output
formats, and not always in line with the documented behaviour with
respect to overriding.
Now, all of the basic metadata keys are properly handled,
RCS-specified keys properly override, and all of these is documented
more rigorously in lowdown(1).
base header level metadata on all outputs.
Fix an off-by-one where smarty-pants would be applied to some
terms not on a word boundary.
For example, 1/40 was erroneously construed as 1/4 then a zero.
for the installed library and improve the documentation.
Enable and enforce portability by also running regression tests over
all operating systems and architectures.
System now works out-of-the-box on OpenBSD, FreeBSD, NetBSD, Linux,
SunOS, OmniOS (IllumOS), Darwin.
Lots of small portability tweaks to the build system.
This involves the newest
Full support for definition lists (with a single definition key).
These are reflected in all output media.
Make sure that all output media reflect the block status of lists.
For example, if a list item has block elements, all list
items (before and after) should reflect block output status.
Pull in newest oconfigure.
Make sure that the system conforms with the original Markdown test
This involves significant unsetting of options, but it does work.
Fix escaping of section headers in -Tms and -Tman.
Update the www materials to be more concise and reflect current
Best-effort to convert embedded entities (numeric and named) to the
appropriate output sequence in -Tterm, -Tms, and
For the former, this is just a UTF-8 sequence.
For the latter two, these are
This enables the non-HTML front-ends to have entity output.
Completely overhaul the
This is now fully documented in
In short, smart typography is now applied to the parse tree, not to
This allows the removal of a significant amount of code.
With smart typography no longer a per-formatter case, overhaul the
library interface for extracting metadata.
This was not possible before because the smart typography applied to
formatted output; thus, metadata needed to be rendered and then
converted (and escaped, too).
Metadata is now extracted during rendering so that a caller
requesting (e.g.) HTML metadata is passed the correct, formatted
warning output, as it was only used in a
handful of cases and required enough infrastructure to avoid it.
Re-write options to use
So instead of applying -Dnroff-groff or whatnot, use long
options such as --nroff-groff.
This is much easier to document and expands to allowing option values.
The existing method is no longer documented, but still works.
This is documented in lowdown(1).
Add many options for -Tterm output: margins, widths, URL
Have paragraph content be indented and also consistently indent
other block levels to line them up.
Lastly, add a -Tnull output for fuzzing.
This makes for a tighter coverage map to focus on parsing and smart
Add -Tterm output, which renders Markdown-like output on the
terminal. This is inspired by
This output is still experimental and the style may currently not be
Add missing documentation to lowdown(5): footnotes, image
attributes, strike-through, highlighting.
Also bring the code style up to date, add debugging to
-Ttree, and update
Yet another bug fix for Mac OSX compilation.
Bug fix for Mac OSX compilation.
In CommonMark mode, have the first ordered list item be output as
the initial list value.
This differs from regular MarkDown, which always starts lists at
Also bring in the newest
Fix a segmentation fault.
Clarify and document mathematics handling.
Don't require the
mathexp feature: just use
math for everything.
Document this in lowdown(5).
Push diff implementation (from libdiff)
directly into the code instead of using the external library.
From a patch by Anton Lindqvist as suggested on the OpenBSD ports
Significantly update the diffing algorithm.
First, make some general fixes to the algorithm.
Second, improve the
optimisations phase by adding top-down analysis that matches un-matched, non-terminal
This helps with text changes in text-only paragraphs.
Third, add a SES (shortest edit script) computation for matched adjacent text nodes.
Lastly, add the new diff function manpages.
Portability: don't use
%F for date formatting.
This doesn't work with some libc versions.
Also some documentation readability improvements.
Strip leading white-space from metadata extracted using -X.
Sync with newest oconfigure.
diff tool, lowdown-diff(1).
This utility uses an algorithm adapted from Detecting Changes in XML Documents
to compute the semantic difference between two parse trees.
It is fully documented.
While there, also add more inter-paragraph spacing to -Tms output, producing more elegant documents,
and continue fleshing out lowdown(5).
Also add some more metadata recognition in -s output for all modes (
Re-wrote escape parser to -Tms and -Tman to respect roff special characters.
Have e-mail autolinks respect the
mailto: in pdfhref'd output, and have links with
mailto: omit the schema in display just like in -Thtml.
Make block-list-items render properly in -Tms and -Tman.
Also introduce lowdown(5), a work-in-progress to document the Markdown formatting
accepting by this system.
The first were noted, and the last contributed in full, by Christina
Sophonpanich — thanks!
Fixed compilation on Linux and Mac OS X by adding
Noted by Christina Sophonpanich — thanks!
Considerable clean-up of -Tms and -Tman, with the aim of much higher PDF output quality:
proper nested list support, hyperlinks, PS/PDF TOC, and even some images (PS/EPS only—experimental!).
Also, after some pointers on the groff mailing list, use the correct
invocation for generating PDF output.
Fix up footnote printing to use automatic -ms macros and registers, if applicable.
Also added support for the
affiliation metadata keyword.
Added some CommonMark support, initially just escaped newlines,
supported only when the commonmark input flag is specified.
Removed the sphd input flag in favour of commonmark.
Also fixed raw HTML block outputting and setext-style level-two headers.
Fix installation of manpages (in Makefile) thanks to Anton Lindqvist.
Clean up the code some more—no functional changes, just removing useless casts and improving documentation style.
<sys/queue.h> header to library manpages.
Hot-fix number two: fix that
.pdfhref was typo'd into
Hot-fix in installing manpages.
Also fix the configure script to inherit
CFLAGS thanks to Anton Lindqvist.
Replaced use of
uint8_t in favour of traditional
char, where appropriate.
Most of all, fully document the new lowdown(3) interface.
These are listed here:
Significant internal re-write, moving from
in-line production of output to production of a parse tree,
which in turn is used to create output.
This removed a tremendous amount of cruft from document.c, including several structural elements such as pools and stacks.
The only notable difference is that PDF output with hyperlinks looks better.
(HTML output should look the same.)
html-head-ids as a tunable output option for HTML.
CSS metadata key recognised in the HTML standalone output.
Also, document the accepted metadata keys better in the manpage.
The library functions have been simplified, with the standalone functions being removed in favour of output options.
The next releases will include more library functions currently undocumented in the header file.
Fix how the final metadata with multiple lines wouldn't have the last line processed.
[%metadata] embedded in documents.
(Thanks to Anton Lindqvist for furnishing several patches for metadata!)
Note that lowdown doesn't do anything with metadata beyond pasting or standalone document creation.
Metadata has also been expanded to allow for multiple authors.
Add the nroff-numbered output mode option for numbered sections.
(None for HTML5 because it can be done with CSS.)
Add some default roff goop to the standalone -Tms file for prettier section names.
Some improvements to -Tms and -Tman readability.
Namely, lists won't have a leading newline when the first child is a paragraph.
Also make the -Thtml output more conformant to the Markdown testing suites.
To wit, add the smarty output option to disable
(It's enabled by default.)
standalone document code generator into the library,
This makes it easier for callers to create the document shell.
More small fixes, many contributed by Anton Lindqvist, for a smooth OpenBSD port.
Also internal clean-ups to the legacy code bits.
One-line fix to bundle the
configure file with the distribution.
Noted by Anton Lindqvist—thanks!
Accept image dimensions and pass them to the HTML output formatter.
Many internal clean-ups thanks to Anton Lindqvist.
Significantly update the parser to pass newline status to the front-ends, allowing (finally) for formatted links
for the -Tms and -Tman outputs when in GNU extension mode.
In the former case, this uses
In the latter cases,
Doing this involved touching basically the entire backend.
It was not pretty.
I've described the problems in the
Hacking section of the web site.
semantic quotes (where in HTML mode qoutes would be rendered as
underline as emphasis, which rendered emphasis as an underline.
The underlines aren't easy in -Tms and -Tman and presentationally confusing (is it a link?) in
Clean up nroff output a bit thanks to Baptiste Daroussin — thanks!
Add output-mode flags to lowdown(3).
Note: the -E flag of lowdown(1) has been renamed to
The -E flag, and the new -D, are used to control output modes just like -e and -d
Fix for compiling on FreeBSD. No other change.
First, add warnings with -v.
This reports MultiMarkdown and CommonMark violations.
Second, add the -e and -d flags to enable and disable, respectively, Markdown features.
For a list of Markdown features, see lowdown(1).
Third, implement MultiMarkdown meta-data with the metadata feature, enabled by default.
Lastly, deprecate the title argument, -t, in favour of the metadata.
The lowdown(3) interface has changed to accommodate for the new metadata features.
Add a -E flag to extract metadata directly, too.
Note: metadata values are still not used within the document.
So you can't
fill in metadata keys within the text.
The metadata tags, for now, are informational except in that they provide a title.
This will be expanded upon in later versions.
Lastly, remove the behaviour of printing the first HTML paragraph within an
This is now deprecated by metadata parsing.
Fix escaping of -Tman and -Tnroff output, then rename -Tnroff to -Tms. Add
documentation to index page regarding hacking.
Initial public download of a stable release.