Index: openacs-4/packages/wiki/tcl/wikit-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/tcl/wikit-procs.tcl,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/wiki/tcl/wikit-procs.tcl 7 Jan 2005 16:51:51 -0000 1.1.2.2 +++ openacs-4/packages/wiki/tcl/wikit-procs.tcl 11 Aug 2005 15:06:29 -0000 1.1.2.3 @@ -111,20 +111,28 @@ foreach line [split $text \n] { # Per line, classify the it and extract the main textual information. foreach {tag depth txt aux} [linetype $line] break ; # lassign - +ns_log debug " +DB -------------------------------------------------------------------------------- +DB DAVE debugging /var/lib/aolserver/openacs-5-2/packages/wiki/tcl/wikit-procs.tcl +DB -------------------------------------------------------------------------------- +DB tag = '${tag}' +DB depth = '${depth}' +DB txt = '${txt}' +DB aux = '${aux}' +DB --------------------------------------------------------------------------------" # Classification tags # # UL, OL, DL = Lists (unordered/bullet, ordered/enum, # definition/itemized) # PRE = Verbatim / Quoted lines # HR = Horizontal rule # STD = Standard text - + # H1,H2,H3,H4 = headers DAVEB ## Whenever we encounter a special line, not quoted, any ## preceding empty line has no further effect. # switch -exact -- $tag { - HR - UL - OL - DL {set empty_std 0} + HR - UL - OL - DL - H1 - H2 - H3 - H4 {set empty_std 0} default {} } @@ -133,7 +141,7 @@ ## there is any. # switch -exact -- $tag { - HR - UL - OL - DL - PRE { + HR - UL - OL - DL - PRE - H1 - H2 - H3 - H4 { if {$paragraph != {}} { lappend irep T 0 ; render $paragraph set paragraph "" @@ -152,6 +160,7 @@ # PRE | 1 | text to display | # HR | 0 | text of ruler | # STD | 0 | text to display | + # H1-4| 1 DAVEB I have no clue how this works, I'll wing it! # ----+---------------+-----------------+---------------+--------------- # HR - Trivial @@ -174,6 +183,10 @@ lappend irep I 0 ; render $aux lappend irep D 0 ; render $txt } + H1 {lappend irep A 0 ; render $txt} \ + H2 {lappend irep B 0 ; render $txt} \ + H3 {lappend irep C 0 ; render $txt} \ + H4 {lappend irep E 0 ; render $txt} \ PRE { # Transform a preceding 'STD {}' into an empty Q line, # i.e make it part of the verbatim section, enforce @@ -232,6 +245,12 @@ UL {^( +)(\*) (\S.*)$} OL {^( +)(\d)\. (\S.*)$} DL {^( +)([^:]+): (\S.*)$} + H4 {^()(====)(.*)====$} + H3 {^()(===)(.*)===$} + H2 {^()(==)(.*)==$} + H1 {^()(=)(.*)=$} + + } { # Compat: Remove restriction to multiples of 3 spaces. @@ -630,6 +649,14 @@ set count 0 variable html_frag foreach {mode text} $s { +ns_log debug " +DB -------------------------------------------------------------------------------- +DB DAVE debugging /var/lib/aolserver/openacs-5-2/packages/wiki/tcl/wikit-procs.tcl +DB -------------------------------------------------------------------------------- +DB mode = '${mode}' +DB text = '${text}' +DB state = '${state}' +DB --------------------------------------------------------------------------------" switch -exact -- $mode { {} {append result [quote $text]} b - i {append result $html_frag($mode$text)} @@ -646,7 +673,6 @@ continue } set info [$ip $text] - ns_log notice "info is $info" foreach {id name date} $info break if {$id == ""} { @@ -684,7 +710,14 @@ [incr count] $html_frag(_a) \] } } - T - Q - I - D - U - O - H { + T - Q - I - D - U - O - H - A - B - C - E { +ns_log debug " +DB -------------------------------------------------------------------------------- +DB DAVE debugging /var/lib/aolserver/openacs-5-2/packages/wiki/tcl/wikit-procs.tcl +DB -------------------------------------------------------------------------------- +DB state = '${state}' +DB mode = '${mode}' +DB --------------------------------------------------------------------------------" append result $html_frag($state$mode) set state $mode } @@ -733,16 +766,72 @@ vs I T
;vs I Q
;vs I U
;vs D Q
;vs D U
;vs H Q
;vs H U
;vs A Q
;vs A U
;vs B Q
;vs B U
;vs C Q
;vs C U
;vs E Q
;vs E U