]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
docs/parse-support-md: Provide $sectnode->{RealSectNode}
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 15 May 2018 14:39:03 +0000 (15:39 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 15 May 2018 15:41:42 +0000 (16:41 +0100)
No functional change yet.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Lars Kurth <Lars.kurth@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
docs/parse-support-md

index 8af3acc2c1a60e5113881e6b747c29ff6d410286..278072f583fb38587b071f93f57138a191064c72 100755 (executable)
@@ -33,6 +33,7 @@ our $toplevel_sectlist = new_sectlist();
 # $sectlist->{KEY}{Status}[VI] = absent or markdown content
 # $sectlist->{KEY}{Children} = a further $sectlist
 # $sectlist->{KEY}{Key} = KEY
+# $sectlist->{KEY}{RealSectNode} = us, or our parent
 # $sectlist->{KEY}{HasCaveat}[VI] = trueish iff other in a Para
 # $sectlist->{KEY}{RealInSect} = containing real section in @insections, so
 # $sectlist->{KEY}{RealInSect}{HasDescription} = VI for some Emph in Para
@@ -71,6 +72,7 @@ sub find_current_sectnode () {
 
     my $sectnode;
     my $realinsect;
+    my $realsectnode;
     foreach my $s (@insections) {
         my $sectlist = $sectnode
             ? $sectnode->{Children} : $toplevel_sectlist;
@@ -87,6 +89,8 @@ sub find_current_sectnode () {
              HasCaveat => [],
             };
         $sectnode = $sectlist->{$key};
+        $realsectnode = $sectnode if $s->{Anchor};
+        $sectnode->{RealSectNode} = $realsectnode;
     }
     die unless $sectnode;
     return $sectnode;