From db7efddf74c74d09214d4629ba16c27ccacb671a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 7 Jul 2026 16:58:44 +0200 Subject: [PATCH] Texinfo writer: fix spacing bug around HorizontalRule. Closes #11749. --- src/Text/Pandoc/Writers/Texinfo.hs | 3 ++- test/command/11749.md | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 test/command/11749.md diff --git a/src/Text/Pandoc/Writers/Texinfo.hs b/src/Text/Pandoc/Writers/Texinfo.hs index 30a311a8f..4a9166f10 100644 --- a/src/Text/Pandoc/Writers/Texinfo.hs +++ b/src/Text/Pandoc/Writers/Texinfo.hs @@ -241,7 +241,8 @@ blockToTexinfo HorizontalRule = text "@end iftex" $$ text "@ifnottex" $$ text (replicate 72 '-') $$ - text "@end ifnottex" + text "@end ifnottex" $$ + blankline blockToTexinfo (Header 0 _ lst) = do txt <- if null lst diff --git a/test/command/11749.md b/test/command/11749.md new file mode 100644 index 000000000..e7d57c939 --- /dev/null +++ b/test/command/11749.md @@ -0,0 +1,23 @@ +``` +% pandoc -t texinfo +Before + +---- + +After +^D +@node Top +@top Top + +Before + +@iftex +@bigskip@hrule@bigskip +@end iftex +@ifnottex +------------------------------------------------------------------------ +@end ifnottex + +After + +```