]> git.proxmox.com Git - pve-docs.git/blobdiff - scan-adoc-refs
scan for bibliography anchors
[pve-docs.git] / scan-adoc-refs
index 2328bed7bf346425fcbc7f6ee9d8e707d19d8d35..246cd35f26c1548ff82f90dae6cc5de3653acb9d 100755 (executable)
@@ -40,6 +40,7 @@ sub push_environment {
 
     die "undefined environment '$env'\n" if !defined($environments->{$env});
 
+    # FIXME: this seems wrong  (nested env?)?
     return if !$environments->{$env}; # do not track
 
     if ($not) {
@@ -143,6 +144,13 @@ sub scan_adoc_file {
            die "implement me" if $blockid =~m/,/;
            register_blockid($filename, $blockid, $env_stack->[-1]);
        }
+       # fixme: "anchor:"
+       # bibliography anchors
+       if ($line =~ m/\[\[\[([^\]]*)\]\]\]/) {
+           my $blockid = $1;
+           die "implement me" if $blockid =~m/,/;
+           register_blockid($filename, $blockid, $env_stack->[-1]);
+       }
     }
 }