System.Data.SQLite
Check-in [2e0349b541]
Not logged in

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

Overview
Comment:Consistently handle the special case of the first line, even when it seems impossible.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | vtabDocComments
Files: files | file ages | folders
SHA1: 2e0349b541a8ce46be1aa95a4c03d003c67549fc
User & Date: mistachkin 2015-10-18 01:56:41
Context
2015-10-18
04:31
More fixes to input file processing. Initial work on output file processing. check-in: 17daddabf3 user: mistachkin tags: vtabDocComments
01:56
Consistently handle the special case of the first line, even when it seems impossible. check-in: 2e0349b541 user: mistachkin tags: vtabDocComments
01:51
Fix line/paragraph handling. Add support for line prefix. check-in: 4e474edb97 user: mistachkin tags: vtabDocComments
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Doc/vtab.tcl.

87
88
89
90
91
92
93


94






95
96
97
98
99
100
101


102





103
104
105
106
107
108
109
    if {[regexp -- $pattern $line]} then {
      break; # stop on this line for outer loop.
    } else {
      set trimLine [string trim $line]; set data ""

      if {$paragraph > 0 && [string length $trimLine] == 0} then {
        # blank line, close paragraph.


        append data \n $prefix </para>; incr paragraph -1






      } elseif {[string range $trimLine 0 2] eq "<p>"} then {
        # open paragraph ... maybe one line?
        if {[string range $trimLine end-3 end] eq "</p>"} then {
          set newLine [processLine $line]

          if {[string length $newLine] > 0} then {
            # one line paragraph, wrap.


            append data \n $prefix <para>





            append data \n $prefix $newLine
            append data \n $prefix </para>
          }
        } else {
          append data \n $prefix <para>

          set newLine [processLine $line]







>
>
|
>
>
>
>
>
>







>
>
|
>
>
>
>
>







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
    if {[regexp -- $pattern $line]} then {
      break; # stop on this line for outer loop.
    } else {
      set trimLine [string trim $line]; set data ""

      if {$paragraph > 0 && [string length $trimLine] == 0} then {
        # blank line, close paragraph.
        if {[info exists methods($name)]} then {
          # non-first line, leading line separator.
          append data \n $prefix </para>
        } else {
          # first line, no leading line separator.
          append data $prefix </para>
        }

        incr paragraph -1
      } elseif {[string range $trimLine 0 2] eq "<p>"} then {
        # open paragraph ... maybe one line?
        if {[string range $trimLine end-3 end] eq "</p>"} then {
          set newLine [processLine $line]

          if {[string length $newLine] > 0} then {
            # one line paragraph, wrap.
            if {[info exists methods($name)]} then {
              # non-first line, leading line separator.
              append data \n $prefix <para>
            } else {
              # first line, no leading line separator.
              append data $prefix <para>
            }

            append data \n $prefix $newLine
            append data \n $prefix </para>
          }
        } else {
          append data \n $prefix <para>

          set newLine [processLine $line]