From b210f8b362673abd9da1f4d00701d406f1b5a0f0 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Thu, 3 Sep 2009 21:57:44 +0200 Subject: [PATCH] FIX: pipapoc, asciidoc, track actual head level --- doc/asciidoc.pawk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/asciidoc.pawk b/doc/asciidoc.pawk index 094d9ba..d0a15bf 100644 --- a/doc/asciidoc.pawk +++ b/doc/asciidoc.pawk @@ -45,6 +45,15 @@ match($0, com"(.*) HEAD([^ ]+) (.*); *(.*); *(.*)", p) { if (asciidoc_level > 1) --asciidoc_level p[2] = asciidoc_header[asciidoc_level] } + else + { + for (n_HEAD = 0; n_HEAD <=4; ++n_HEAD) { + if (p[2] == asciidoc_header[n_HEAD]) { + asciidoc_level = n_HEAD + break + } + } + } if (p[4]) { -- 2.11.4.GIT