Tcl Library Source Code

Check-in [7eb9daedd0]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Additional narrative tracing in text support.
Timelines: family | ancestors | descendants | both | doc-fixup-and-markdown
Files: files | file ages | folders
SHA3-256: 7eb9daedd08007eafa65488098667dfccefe0d47e2dda43036fee364f68c9939
User & Date: aku 2019-03-19 03:41:48
Context
2019-03-19
03:42
Text engine, fixed inverted conditions check-in: baa78c4740 user: aku tags: doc-fixup-and-markdown
03:41
Additional narrative tracing in text support. check-in: 7eb9daedd0 user: aku tags: doc-fixup-and-markdown
03:41
Better MD comment support. check-in: 10268352a5 user: aku tags: doc-fixup-and-markdown
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/doctools/mpformats/_text_dlist.tcl.

54
55
56
57
58
59
60

61
62
63
64
65
66
67
...
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

198
199
200
201
202
203
204
205
206
207
208

209
210
211
212
213
214
215
...
242
243
244
245
246
247
248


249
250
251
252
253
254
proc CloseParagraph {{id {}}} {
    set para [Text?]
    if {$para == {}} { return 0 }
    if {$id == {}} { set id [CAttrCurrent] }
    Store PARA $id $para
    #puts_stderr "CloseParagraph $id [CAttrName $id]"

    TextClear
    return 1
} 

proc PostProcess {text} {
    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    #puts_stderr <<$text>>
................................................................................
    # context of each paragraph.
    
    foreach {env text} $arguments break
    ContextSet $env

    #puts_stderr "PARA $env"
    #parray_stderr ::currentEnv
    #puts_stderr "     \{$text\}"
    #puts_stderr ""

    # Use the information in the referenced context to format the
    # paragraph.

    set lm    [Margin?]
    set lt    [ListType?]
    set blank [WPrefix?]
    
    if {[Verbatim?]} {
	set text [Undent $text]

    } else {
	set  plm $lm
	incr plm [string length $blank]
	set text [Reflow $text [RMargin $plm]]
    }

    # Now apply prefixes, (ws prefixes bulleting), at last indentation.

    set p [Prefix?]
    if {[string length $p]} {
	set text [Indent $text $p]

    }

    if {$lt != {}} {
	switch -exact $lt {
	    bullet {
		# Indent for bullet, but not the first line. This is
		# prefixed by the bullet itself.
................................................................................
	}
    }

    if {$lm} {
	set text [Indent $text [Blank $lm]]
    }



    lappend lines $text
    return
}

# # ## ### ##### ########
return






>







 







|











>











>







 







>
>






54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
...
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
...
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
proc CloseParagraph {{id {}}} {
    set para [Text?]
    if {$para == {}} { return 0 }
    if {$id == {}} { set id [CAttrCurrent] }
    Store PARA $id $para
    #puts_stderr "CloseParagraph $id [CAttrName $id]"
    #puts_stderr "  (($para))"
    TextClear
    return 1
} 

proc PostProcess {text} {
    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    #puts_stderr <<$text>>
................................................................................
    # context of each paragraph.
    
    foreach {env text} $arguments break
    ContextSet $env

    #puts_stderr "PARA $env"
    #parray_stderr ::currentEnv
    #puts_stderr "    (($text))"
    #puts_stderr ""

    # Use the information in the referenced context to format the
    # paragraph.

    set lm    [Margin?]
    set lt    [ListType?]
    set blank [WPrefix?]
    
    if {[Verbatim?]} {
	set text [Undent $text]
	#puts_stderr "UN  (($text))"
    } else {
	set  plm $lm
	incr plm [string length $blank]
	set text [Reflow $text [RMargin $plm]]
    }

    # Now apply prefixes, (ws prefixes bulleting), at last indentation.

    set p [Prefix?]
    if {[string length $p]} {
	set text [Indent $text $p]
	#puts_stderr "IN  (($text))"
    }

    if {$lt != {}} {
	switch -exact $lt {
	    bullet {
		# Indent for bullet, but not the first line. This is
		# prefixed by the bullet itself.
................................................................................
	}
    }

    if {$lm} {
	set text [Indent $text [Blank $lm]]
    }

    #puts_stderr "FIN (($text))"
    
    lappend lines $text
    return
}

# # ## ### ##### ########
return