aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2025-03-13 08:54:28 +1000
committerSteve Bennett <steveb@workware.net.au>2025-03-13 10:11:58 +1000
commit8767b55eb67279f3d3fc3880c409f73b472dd280 (patch)
treeaaff7a65f7a7d8d4b37b6948761691900a869fa8
parente90d7c42d512c37c48d82272db069c76ad42a2c7 (diff)
downloadjimtcl-8767b55eb67279f3d3fc3880c409f73b472dd280.zip
jimtcl-8767b55eb67279f3d3fc3880c409f73b472dd280.tar.gz
jimtcl-8767b55eb67279f3d3fc3880c409f73b472dd280.tar.bz2
docs: support auto-numbered lists in docs
When merging different branches it is annoying that numbered lists have to have consecutive numbers for asciidoc. So allow for auto-numbered lists to make this merging easier. Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rwxr-xr-xmake-index8
1 files changed, 8 insertions, 0 deletions
diff --git a/make-index b/make-index
index 5071d88..3532551 100755
--- a/make-index
+++ b/make-index
@@ -9,8 +9,16 @@ set lines {}
set commands {}
array set cdict {}
set c 0
+set numlist 1
while {[gets $f buf] >= 0} {
+ # Handle auto numbered lists
+ if {[string match "#. *" $buf]} {
+ set buf "$numlist. [string range $buf 3 end]"
+ incr numlist
+ } elseif {$buf eq ""} {
+ set numlist 1
+ }
if {[string match "~~*" $buf]} {
if {[string match "*: *" $prev]} {
incr c