diff options
author | dan <dan@noemail.net> | 2014-11-15 20:07:31 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2014-11-15 20:07:31 +0000 |
commit | 48d70140678b2fb74f7afddb8185e4becc195bb8 (patch) | |
tree | 6b2fa49b35ce27ccc3b87c24ee2a29f21334b1d2 /ext/fts5/extract_api_docs.tcl | |
parent | 4aee5dff8320423b7e810f0a1912758be245c1c1 (diff) | |
download | sqlite-48d70140678b2fb74f7afddb8185e4becc195bb8.tar.gz sqlite-48d70140678b2fb74f7afddb8185e4becc195bb8.zip |
Fix the customization interfaces so that they match the documentation.
FossilOrigin-Name: fba0b5fc7eead07a4853e78e02d788e7c714f6cd
Diffstat (limited to 'ext/fts5/extract_api_docs.tcl')
-rw-r--r-- | ext/fts5/extract_api_docs.tcl | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/ext/fts5/extract_api_docs.tcl b/ext/fts5/extract_api_docs.tcl index e0f3191d6..81fe4cde5 100644 --- a/ext/fts5/extract_api_docs.tcl +++ b/ext/fts5/extract_api_docs.tcl @@ -15,6 +15,17 @@ # is included in the documentation on the web. # +set ::fts5_docs_output "" +if {[info commands hd_putsnl]==""} { + proc output {text} { + puts $text + } +} else { + proc output {text} { + append ::fts5_docs_output $text + } +} + set input_file [file join [file dir [info script]] fts5.h] set fd [open $input_file] set data [read $fd] @@ -102,28 +113,28 @@ foreach {hdr docs} $D { if {[info exists M($hdr)]} { set hdr $M($hdr) } - puts "<h3><pre> $hdr</pre></h3>" + output "<h style=\"font-size:1.4em;background-color:#EEEEEE;display:block\"><pre> $hdr</pre></h>" set mode "" set bEmpty 1 foreach line [split [string trim $docs] "\n"] { if {[string trim $line]==""} { - if {$mode != ""} {puts "</$mode>"} + if {$mode != ""} {output "</$mode>"} set mode "" } elseif {$mode == ""} { if {[regexp {^ } $line]} { - set mode code + set mode codeblock } else { set mode p } - puts "<$mode>" + output "<$mode>" } - puts $line + output $line } - if {$mode != ""} {puts "</$mode>"} + if {$mode != ""} {output "</$mode>"} } - +set ::fts5_docs_output |