Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
badw-it
DHParser
Commits
fd6fd247
Commit
fd6fd247
authored
Jun 09, 2018
by
eckhart
Browse files
- Fehlerkorrekturen
parent
fe1c178e
Changes
1
Hide whitespace changes
Inline
Side-by-side
DHParser/syntaxtree.py
View file @
fd6fd247
...
...
@@ -512,7 +512,7 @@ class Node(collections.abc.Sized):
res
=
cast
(
str
,
self
.
result
)
# safe, because if there are no children, result is a string
if
density
&
1
and
res
.
find
(
'
\n
'
)
<
0
:
# and head[0] == "<":
# except for XML, add a gap between opening statement and content
gap
=
' '
if
head
.
rstrip
()[
-
1
]
!=
'>'
else
''
gap
=
' '
if
head
and
head
.
rstrip
()[
-
1
:
]
!=
'>'
else
''
return
head
.
rstrip
()
+
gap
+
data_fn
(
self
.
result
)
+
tail
.
lstrip
()
else
:
return
head
+
'
\n
'
.
join
([
tab
+
data_fn
(
s
)
for
s
in
res
.
split
(
'
\n
'
)])
+
tail
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment