Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5diff
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
erp5diff
Commits
3cc702ba
Commit
3cc702ba
authored
Jul 08, 2010
by
Nicolas Delaby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude comments or processing instruction as sibling node
parent
1692fd42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
ERP5Diff.py
ERP5Diff.py
+14
-2
No files found.
ERP5Diff.py
View file @
3cc702ba
...
...
@@ -229,8 +229,20 @@ class ERP5Diff:
len_total_child_list
=
len
(
parent_element
)
last_append_element
=
None
for
element
in
element_list
:
relative_next
=
element
.
getnext
()
relative_previous
=
element
.
getprevious
()
# get only elements not something else (PI and comments are ignored)
# XXX May be support of PI and Comments should be added
# in this case fallback to previous code
# relative_next = element.getnext()
relative_next_list
=
element
.
xpath
(
'following-sibling::*[1]'
)
if
relative_next_list
:
relative_next
=
relative_next_list
[
0
]
else
:
relative_next
=
None
relative_previous_list
=
element
.
xpath
(
'preceding-sibling::*[1]'
)
if
relative_previous_list
:
relative_previous
=
relative_previous_list
[
0
]
else
:
relative_previous
=
None
if
relative_previous
in
element_list
:
#reuse same container as preceding
append_element
=
last_append_element
...
...
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