Skip to content

Commit 8313e45

Browse files
authored
Use config newline setting in system attribute evaluation (#155)
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.
1 parent 206e7ef commit 8313e45

File tree

6 files changed

+1640
-1
lines changed

6 files changed

+1640
-1
lines changed

‎asciidoc.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ def system(name, args, is_macro=False, attrs=None):
969969
line = subs_attrs(line)
970970
if line is not None:
971971
result.append(line)
972-
result = DEFAULT_NEWLINE.join(result)
972+
result = config.newline.join(result)
973973
else:
974974
assert False
975975
if result and name in ('eval3', 'sys3'):

0 commit comments

Comments
 (0)