scdoc/test d---------
7bdbb5ba — Sebastian 14 days ago master
Disallows differing row lengths in table

scdoc will now fail if the rows in a table don't all have the same
length. A test has also been added to check this behavior, and scdoc(5)
has been updated to clarify the behavior.

Signed-off-by: Sebastian <sebastian@sebsite.pw>
Suppress sentence spacing after end-of-sentence characters.

This should fix the inconsistent spacing issue mentioned in [1]. I also
fixed a spacing in issue in the man page.

[1]: https://lists.sr.ht/~sircmpwn/public-inbox/%3CC4VKFSIFINOA.X6VCIU2AV88M%40szk%3E
0917856a — Damien Tardy-Panis 1 year, 4 months ago
Fix parsing of line breaks followed by underlined text
da7d5e6c — Damien Tardy-Panis 1 year, 4 months ago
Fix parsing of line breaks without newline
059002cd — Damien Tardy-Panis 1 year, 4 months ago
Add basic working tests for line breaks parsing
baaebab7 — Damien Tardy-Panis 1 year, 7 months ago
Allow subsection in preamble

Subsections are useful in case on name conflicts within a section.
Typically man pages in distributions are using the 'p' subsection.
They are also needed for the man pages of wrapper commands for example.
656484e0 — Damien Tardy-Panis 1 year, 7 months ago
Section needs to be explicitly defined

The absence of value between the section parentheses resulted in the
section being 0 (header files), which is unlikely to be the one wanted
Fix `date --date` dependent test

This test depends on a nonportable option for date(1). I am not sure
that there is a good portable way to do this, so I just directly
included the seconds since epoch that it would have computed. We're
testing scdoc, not testing the local system's date command.
Fix timezone-dependent tests

These tests fail depending on timezone and current time if the date
differs from the UTC date. This was remedied by using `date -u`, which
5c782cda — Zandr Martin 2 years ago 1.9.7
fix bug preventing indented literal blocks

This commit fixes a bug in parsing indented literal blocks. For example:


	This is a block

Prior to this commit, this would fail, but with an unexpected error
message: "Error at 4:3: Cannot deindent in literal block". The
indentation was being parsed at every character, so the parser saw the
`T`, then parsed indentation again. The indentation was 0 (since there
were no tab characters between the `T` and the `h`), but the block
started with an indentation level of 1. 0 < 1, so this would be
considered a dedent, which is not allowed.

This commit introduces a new local variable, `check_indent`, which
controls whether the parser tries to parse indentation or not; now
indentation is only parsed when the last character was a newline. From
my testing this seems to fix the issue - indented literal blocks are now
0c26abe0 — Zandr Martin 2 years ago
enforce 1-step indentation

Allow multi-step indentation in literal blocks, and allow multi-step
Revert "fix enforcement of 1-step indentation"

This reverts commit 8c537aa2956a55fe341e1d48110ae6985ada7e5f.
8c537aa2 — Zandr Martin 2 years ago
fix enforcement of 1-step indentation
use TZ=UTC in test case
Fix SOURCE_DATE_EPOCH test w/busybox date
Fix the "Ignores underscores in underlined words" test

The test produced the following output:
Ignores underscores in underlined words test/inline-formatting: line 26: end0: not found
f1db2e16 — Carlo Abelli 2 years ago
fix underscores in underlined words

Currently, the first underscore encountered while underlining ends
underlining. As a result, underscores in underlined words are not
ignored e.g. _hello_world_ does not parse correctly.

This checks the next character to see if it is still in a word before
ending underlining.
Use a more robust approach for in-word-underscores
b321334d — Jakub Kądziołka 2 years ago
Test for empty table cells
Support $SOURCE_DATE_EPOCH for reproducible man pages

The environment variable SOURCE_DATE_EPOCH [0] is standardized and can
be used to produce reproducible output. Distributions like Debian will
set this variable before the build and scdoc should use it (instead of
the current date) for any timestamps within the man pages.

[0]: https://reproducible-builds.org/docs/source-date-epoch/