Tcl Library Source Code

Check-in [945b80356c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed forgotten reset of md comment counter between documents. Fixed missing md extension declaration in the localdoc implementation.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | doc-fixup-and-markdown-localdoc
Files: files | file ages | folders
SHA3-256: 945b80356c3f0057657e2b140661f2062e6b7d14694a020cc66725b00a201ca7
User & Date: aku 2019-03-21 01:48:20.577
Context
2019-03-21
01:50
Switched embedded docs to markdown. Regenerated install docs. check-in: 7cfe8cda34 user: aku tags: doc-fixup-and-markdown-localdoc
01:48
Fixed forgotten reset of md comment counter between documents. Fixed missing md extension declaration in the localdoc implementation. check-in: 945b80356c user: aku tags: doc-fixup-and-markdown-localdoc
2019-03-20
23:39
Merge latest work done on markdown generator (tocs, xrefs). check-in: 945be77637 user: aku tags: doc-fixup-and-markdown-localdoc
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/doctools/mpformats/_markdown.tcl.
45
46
47
48
49
50
51


52
53
54
55
56
57
58
proc Em     {text} { return *${text}* }

##
# # ## ### ##### ########
##

set __comments 0



proc MDComment {text} {
    global __comments
    Text "\n\[//[format %09d [incr __comments]]\]: # ($text)"
}

proc MDCDone {} {







>
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
proc Em     {text} { return *${text}* }

##
# # ## ### ##### ########
##

set __comments 0

proc MDCInit {} { global __comments ; set __comments 0 }

proc MDComment {text} {
    global __comments
    Text "\n\[//[format %09d [incr __comments]]\]: # ($text)"
}

proc MDCDone {} {
Changes to modules/doctools/mpformats/fmt.markdown.
254
255
256
257
258
259
260

261
262
263
264
265
266
267

    return $img
}

c_pass 1 fmt_manpage_begin {title section version} {c_cinit ; c_clrSections ; return}
c_pass 2 fmt_manpage_begin {title section version} {
    Off

    XrefInit
    c_cinit

    set module      [dt_module]
    set shortdesc   [c_get_module]
    set description [c_get_title]








>







254
255
256
257
258
259
260
261
262
263
264
265
266
267
268

    return $img
}

c_pass 1 fmt_manpage_begin {title section version} {c_cinit ; c_clrSections ; return}
c_pass 2 fmt_manpage_begin {title section version} {
    Off
    MDCInit
    XrefInit
    c_cinit

    set module      [dt_module]
    set shortdesc   [c_get_module]
    set description [c_get_title]

Changes to modules/doctools/mpformats/idx.markdown.
20
21
22
23
24
25
26

27
28
29
30
31
32
33
rename text_postprocess idx_postprocess
proc   fmt_plain_text {text} {return {}}

################################################################
## Backend for plain text markup

proc fmt_index_begin {label title} {

    if {($label != {}) && ($title != {})} {
	set title "$label -- $title"
    } elseif {$label != {}} {
	set title $label
    } elseif {$title != {}} {
	 # title is set
    }







>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
rename text_postprocess idx_postprocess
proc   fmt_plain_text {text} {return {}}

################################################################
## Backend for plain text markup

proc fmt_index_begin {label title} {
    MDCInit
    if {($label != {}) && ($title != {})} {
	set title "$label -- $title"
    } elseif {$label != {}} {
	set title $label
    } elseif {$title != {}} {
	 # title is set
    }
Changes to modules/doctools/mpformats/toc.markdown.
19
20
21
22
23
24
25

26
27
28
29
30
31
32

proc fmt_plain_text {text} {return {}}

################################################################
## Backend for Markdown markup

proc fmt_toc_begin {label title} {

    set title "$label -- $title"
    
    TextInitialize

    MDComment "Table of contents [Provenance]"
    MDCDone








>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

proc fmt_plain_text {text} {return {}}

################################################################
## Backend for Markdown markup

proc fmt_toc_begin {label title} {
    MDCInit
    set title "$label -- $title"
    
    TextInitialize

    MDComment "Table of contents [Provenance]"
    MDCDone

Changes to support/devel/sak/localdoc/localdoc.tcl.
131
132
133
134
135
136
137

138
139
140
141
142
143
144
    lappend config -exclude  {*/doctools/tests/*}
    lappend config -exclude  {*/support/*}
    lappend config -toc      $toc
    lappend config -post+toc Categories    $cats
    lappend config -post+toc Modules       $mods
    lappend config -post+toc Applications  $apps
    lappend config -merge

    lappend config -o embedded/md
    lappend config markdown .

    dtplite::do $config

    puts "Generating Markdown (online)... Pass 2, resolving cross-references..."
    dtplite::do $config







>







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
    lappend config -exclude  {*/doctools/tests/*}
    lappend config -exclude  {*/support/*}
    lappend config -toc      $toc
    lappend config -post+toc Categories    $cats
    lappend config -post+toc Modules       $mods
    lappend config -post+toc Applications  $apps
    lappend config -merge
    lappend config -ext md
    lappend config -o embedded/md
    lappend config markdown .

    dtplite::do $config

    puts "Generating Markdown (online)... Pass 2, resolving cross-references..."
    dtplite::do $config