-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorder consecutive index and target nodes
An index directive creates a index node followed by a target node. Two consecutive index directives:: .. index:: first .. index:: second create index, target, index, target, i.e. a mixture. The interspersed index nodes prevent other transformations, e.g. PropagateTargets to properly work on the target nodes. Apply a transformation which reorders mixed and consecutive index and target nodes such that first all index nodes are before all target nodes: Given the following document as input: <document> <target ids="id1" ...> <index entries="...1..."> <target ids="id2" ...> <target ids="id3" ...> <index entries="...2..."> <target ids="id4" ...> The transformed result will be: <document> <index entries="...1..."> <index entries="...2..."> <target ids="id1" ...> <target ids="id2" ...> <target ids="id3" ...> <target ids="id4" ...>
- Loading branch information
1 parent
f93482a
commit 9cd1f4c
Showing
1 changed file
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters