Hello community, here is the log from the commit of package scdoc for openSUSE:Factory checked in at 2019-08-23 11:10:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/scdoc (Old) and /work/SRC/openSUSE:Factory/.scdoc.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "scdoc" Fri Aug 23 11:10:06 2019 rev:10 rq:725439 version:1.9.7 Changes: -------- --- /work/SRC/openSUSE:Factory/scdoc/scdoc.changes 2019-07-11 13:19:02.546755124 +0200 +++ /work/SRC/openSUSE:Factory/.scdoc.new.7948/scdoc.changes 2019-08-23 11:10:07.370455571 +0200 @@ -1,0 +2,7 @@ +Fri Aug 23 05:32:22 UTC 2019 - mvet...@suse.com + +- Update to 1.9.7: + * Remove unnecessary `closed` variable in parse_list + * Fix bug preventing indented literal blocks + +------------------------------------------------------------------- Old: ---- 1.9.6.tar.gz New: ---- 1.9.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ scdoc.spec ++++++ --- /var/tmp/diff_new_pack.SuEbnV/_old 2019-08-23 11:10:07.954455499 +0200 +++ /var/tmp/diff_new_pack.SuEbnV/_new 2019-08-23 11:10:07.954455499 +0200 @@ -17,7 +17,7 @@ Name: scdoc -Version: 1.9.6 +Version: 1.9.7 Release: 0 Summary: A man page generator written in C99 License: MIT ++++++ 1.9.6.tar.gz -> 1.9.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scdoc-1.9.6/src/main.c new/scdoc-1.9.7/src/main.c --- old/scdoc-1.9.6/src/main.c 2019-07-10 20:09:27.000000000 +0200 +++ new/scdoc-1.9.7/src/main.c 2019-08-16 02:23:43.000000000 +0200 @@ -333,7 +333,6 @@ } list_header(p, &num); parse_text(p); - bool closed = false; do { parse_indent(p, indent, true); if ((ch = parser_getch(p)) == UTF8_INVALID) { @@ -351,12 +350,9 @@ if ((ch = parser_getch(p)) != ' ') { parser_fatal(p, "Expected space before start of list entry"); } - if (!closed) { - roff_macro(p, "RE", NULL); - } + roff_macro(p, "RE", NULL); list_header(p, &num); parse_text(p); - closed = false; break; default: fprintf(p->output, "\n"); @@ -365,9 +361,7 @@ } } while (ch != UTF8_INVALID); ret: - if (!closed) { - roff_macro(p, "RE", NULL); - } + roff_macro(p, "RE", NULL); } static void parse_literal(struct parser *p, int *indent) { @@ -380,15 +374,19 @@ int stops = 0; roff_macro(p, "nf", NULL); fprintf(p->output, ".RS 4\n"); + bool check_indent = true; do { - int _indent = *indent; - parse_indent(p, &_indent, false); - if (_indent < *indent) { - parser_fatal(p, "Cannot deindent in literal block"); - } - while (_indent > *indent) { - --_indent; - fprintf(p->output, "\t"); + if (check_indent) { + int _indent = *indent; + parse_indent(p, &_indent, false); + if (_indent < *indent) { + parser_fatal(p, "Cannot deindent in literal block"); + } + while (_indent > *indent) { + --_indent; + fprintf(p->output, "\t"); + } + check_indent = false; } if ((ch = parser_getch(p)) == UTF8_INVALID) { break; @@ -421,6 +419,9 @@ utf8_fputch(p->output, ch); } break; + case '\n': + check_indent = true; + /* fallthrough */ default: utf8_fputch(p->output, ch); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scdoc-1.9.6/test/indent new/scdoc-1.9.7/test/indent --- old/scdoc-1.9.6/test/indent 2019-07-10 20:09:27.000000000 +0200 +++ new/scdoc-1.9.7/test/indent 2019-08-16 02:23:43.000000000 +0200 @@ -54,3 +54,24 @@ Not indented EOF end 0 + +begin "Allows indented literal blocks" +scdoc <<EOF >/dev/null +test(8) + + \`\`\` + This block is indented. + \`\`\` +EOF +end 0 + +begin "Disallows dedenting in literal blocks" +scdoc <<EOF >/dev/null +test(8) + + \`\`\` + This block is indented. + This line is dedented past the start of the block. + \`\`\` +EOF +end 1