asciidoc/asciidoc-newline.patch
DistroBaker 1a5611d954 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/asciidoc.git#7d3ef91a576d624b1b454c7fe45b3b1d60dd7ced
2020-12-10 01:05:31 +01:00

29 lines
1.5 KiB
Diff

From 89ac0f48affb054226467b58f5af524ae0760d62 Mon Sep 17 00:00:00 2001
From: "Christopher K. Hoadley" <chris.hoadley@gmail.com>
Date: Sat, 5 Dec 2020 10:59:36 -0600
Subject: [PATCH] Use config Newline Setting In System Attribute Evaluation
(#154)
Problems seen with inconsistent newlines in the Table Of Contents HTML pulled in from the configuration file. While the rest of the contents in the resulting HTML file honored the newline style configured by the user, this specific snippet of HTML always used "\r\n".
This root of this problem existed for some time, but in earlier versions, the newline style was always "\n". The symptoms changed as a side effect of the issue "Extra line padding in source and literal blocks" (#139). In this issue, the newline style changed to "\r\n", and was noticed by users.
Change the System Attribute Evaluation function to use the newline setting from the global "config" instead of using the default newline.
---
asciidoc.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/asciidoc.py b/asciidoc.py
index 5c6b08b3..c33708c9 100755
--- a/asciidoc.py
+++ b/asciidoc.py
@@ -969,7 +969,7 @@ def system(name, args, is_macro=False, attrs=None):
line = subs_attrs(line)
if line is not None:
result.append(line)
- result = DEFAULT_NEWLINE.join(result)
+ result = config.newline.join(result)
else:
assert False
if result and name in ('eval3', 'sys3'):