Tcl Library Source Code

Check-in [859f8caed1]
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:Tweaks to the narrative tracing
Timelines: family | ancestors | descendants | both | doc-fixup-and-markdown
Files: files | file ages | folders
SHA3-256: 859f8caed1feccfe53f9cb68baa3bb2e44e119f0bfcb6a77483878dfa5e437f3
User & Date: andreask 2019-03-19 22:13:45
Context
2019-03-19
23:42
Continued markdown work. More test cases, nested lists. Demonstrate issues with paragraph counting (text & markdown) and indenting (markdown only). Possibly demonstrate issue with text and markdown when a nested list is the first paragraph of an entry, without preceding text. This looks to lose the outer markup for start of entry. check-in: eaa4c90a8c user: andreask tags: doc-fixup-and-markdown
22:13
Tweaks to the narrative tracing check-in: 859f8caed1 user: andreask tags: doc-fixup-and-markdown
22:06
Fixed latex user reference in the results check-in: af4cc3338e user: andreask tags: doc-fixup-and-markdown
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

47
48
49
50
51
52
53


54
55
56
57
58
59
60
    #puts_stderr "--Set ($id) ([CAttrName $id])"

    # Ensure that array is clean before setting hte new block of
    # information.
    unset     currentContext
    array set currentContext $contextData($currentHandle)


    return
}

proc ContextExists {id} {
    global contextData
    info exists contextData($id)
}






>
>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    #puts_stderr "--Set ($id) ([CAttrName $id])"

    # Ensure that array is clean before setting hte new block of
    # information.
    unset     currentContext
    array set currentContext $contextData($currentHandle)

    #puts_stderr "--Set $contextData($currentHandle)"
    return
}

proc ContextExists {id} {
    global contextData
    info exists contextData($id)
}

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

181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
    # Note. As the display list is processed at the very end we can
    # reuse the current context and accessors to hold and query the
    # 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.







|







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
    # Note. As the display list is processed at the very end we can
    # reuse the current context and accessors to hold and query the
    # context of each paragraph.
    
    foreach {env text} $arguments break
    ContextSet $env

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

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

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

9
10
11
12
13
14
15



16


17
18
19
20
21
22
23
24
25
..
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
## State: Text buffer for paragraphs.

global __currentp

# # ## ### ##### ########
## API




proc Text      {text} { global __currentp ; append __currentp $text ; return }


proc Text?     {}     { global __currentp ; return $__currentp }
proc TextClear {}     { global __currentp ; set __currentp "" }

proc TextTrimLeadingSpace {} {
    global __currentp
    regsub {^([ \t\v\f]*\n)*} $__currentp {} __currentp
    return
}

................................................................................

    if {[string length [string trim $text]] == 0} return

    Text $text
    return
}

#return
# # ## ### ##### ########
## Debugging

proc Text {text} {
    #puts_stderr "T++ (($text))"
    global __currentp
    append __currentp $text
    return
}






>
>
>
|
>
>
|
|







 







|

<
<
<
<
<
<
|
<
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
49
50
51
52
53
54
55
56
57






58

## State: Text buffer for paragraphs.

global __currentp

# # ## ### ##### ########
## API

proc Text {text} {
    #puts_stderr "T++ (($text))"
    global __currentp
    append __currentp $text
    return
}
proc Text?     {} { global __currentp ; return $__currentp }
proc TextClear {} { global __currentp ; set __currentp "" }

proc TextTrimLeadingSpace {} {
    global __currentp
    regsub {^([ \t\v\f]*\n)*} $__currentp {} __currentp
    return
}

................................................................................

    if {[string length [string trim $text]] == 0} return

    Text $text
    return
}

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






return