home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.0.120 < prev    next >
Encoding:
Internet Message Format  |  2002-01-06  |  5.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.120
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.120
  11. Problem:    The conversion to html isn't compatible with XHTML.
  12. Solution:   Quote the values. (Jess Thrysoee)
  13. Files:      runtime/syntax/2html.vim
  14.  
  15.  
  16. *** ../vim60.119/runtime/syntax/2html.vim    Sun Sep  2 14:43:04 2001
  17. --- runtime/syntax/2html.vim    Mon Jan  7 22:24:33 2002
  18. ***************
  19. *** 1,6 ****
  20.   " Vim syntax support file
  21.   " Maintainer: Bram Moolenaar <Bram@vim.org>
  22. ! " Last Change: 2001 Sep 02
  23.   "           (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>)
  24.   
  25.   " Transform a file into HTML, using the current syntax highlighting.
  26. --- 1,6 ----
  27.   " Vim syntax support file
  28.   " Maintainer: Bram Moolenaar <Bram@vim.org>
  29. ! " Last Change: 2001 Dec 12
  30.   "           (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>)
  31.   
  32.   " Transform a file into HTML, using the current syntax highlighting.
  33. ***************
  34. *** 71,77 ****
  35.         let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
  36.         let a = a . '<span style="background-color: ' . ( x != "" ? x : s:fgc ) . '">'
  37.         let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
  38. !       let a = a . '<font color="' . ( if x != "" ? x : s:bgc ) . '">'
  39.       else
  40.         let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
  41.         if x != "" | let a = a . '<span style="background-color: ' . x . '">' | endif
  42. --- 71,77 ----
  43.         let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
  44.         let a = a . '<span style="background-color: ' . ( x != "" ? x : s:fgc ) . '">'
  45.         let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
  46. !       let a = a . '<font color="' . ( x != "" ? x : s:bgc ) . '">'
  47.       else
  48.         let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
  49.         if x != "" | let a = a . '<span style="background-color: ' . x . '">' | endif
  50. ***************
  51. *** 184,190 ****
  52.     let s:new = ""
  53.   
  54.     if s:numblines
  55. !     let s:new = '<span class=lnr>' . strpart('        ', 0, strlen(line("$")) - strlen(s:lnum)) . s:lnum . '</span>  '
  56.     endif
  57.   
  58.     " Loop over each character in the line
  59. --- 184,190 ----
  60.     let s:new = ""
  61.   
  62.     if s:numblines
  63. !     let s:new = '<span class="lnr">' . strpart('        ', 0, strlen(line("$")) - strlen(s:lnum)) . s:lnum . '</span>  '
  64.     endif
  65.   
  66.     " Loop over each character in the line
  67. ***************
  68. *** 199,205 ****
  69.   
  70.       " Output the text with the same synID, with class set to c{s:id}
  71.       let s:id = synIDtrans(s:id)
  72. !     let s:new = s:new . '<span class=c' . s:id . '>' . substitute(substitute(substitute(substitute(substitute(strpart(s:line, s:startcol - 1, s:col - s:startcol), '&', '\&', 'g'), '<', '\<', 'g'), '>', '\>', 'g'), '"', '\"', 'g'), "\x0c", '<hr class="PAGE-BREAK">', 'g') . '</span>'
  73.       " Add the class to class list if it's not there yet
  74.       if stridx(s:idlist, "," . s:id . ",") == -1
  75.         let s:idlist = s:idlist . s:id . ","
  76. --- 199,205 ----
  77.   
  78.       " Output the text with the same synID, with class set to c{s:id}
  79.       let s:id = synIDtrans(s:id)
  80. !     let s:new = s:new . '<span class="c' . s:id . '">' . substitute(substitute(substitute(substitute(substitute(strpart(s:line, s:startcol - 1, s:col - s:startcol), '&', '\&', 'g'), '<', '\<', 'g'), '>', '\>', 'g'), '"', '\"', 'g'), "\x0c", '<hr class="PAGE-BREAK">', 'g') . '</span>'
  81.       " Add the class to class list if it's not there yet
  82.       if stridx(s:idlist, "," . s:id . ",") == -1
  83.         let s:idlist = s:idlist . s:id . ","
  84. ***************
  85. *** 252,258 ****
  86.     if exists("html_use_css")
  87.       execute "normal A\n.lnr { " . s:CSS1(highlightID("LineNr")) . "}\e"
  88.     else
  89. !     execute '%s+<span class=lnr>\([^<]*\)</span>+' . s:HtmlOpening(highlightID("LineNr")) . '\1' . s:HtmlClosing(highlightID("LineNr")) . '+g'
  90.     endif
  91.   endif
  92.   
  93. --- 252,258 ----
  94.     if exists("html_use_css")
  95.       execute "normal A\n.lnr { " . s:CSS1(highlightID("LineNr")) . "}\e"
  96.     else
  97. !     execute '%s+<span class="lnr">\([^<]*\)</span>+' . s:HtmlOpening(highlightID("LineNr")) . '\1' . s:HtmlClosing(highlightID("LineNr")) . '+g'
  98.     endif
  99.   endif
  100.   
  101. ***************
  102. *** 270,279 ****
  103.       if exists("html_use_css")
  104.         execute "normal A\n.c" . s:id . " { " . s:attr . "}"
  105.       else
  106. !       execute '%s+<span class=c' . s:id . '>\([^<]*\)</span>+' . s:HtmlOpening(s:id) . '\1' . s:HtmlClosing(s:id) . '+g'
  107.       endif
  108.     else
  109. !     execute '%s+<span class=c' . s:id . '>\([^<]*\)</span>+\1+g'
  110.       8
  111.     endif
  112.   endwhile
  113. --- 270,279 ----
  114.       if exists("html_use_css")
  115.         execute "normal A\n.c" . s:id . " { " . s:attr . "}"
  116.       else
  117. !       execute '%s+<span class="c' . s:id . '">\([^<]*\)</span>+' . s:HtmlOpening(s:id) . '\1' . s:HtmlClosing(s:id) . '+g'
  118.       endif
  119.     else
  120. !     execute '%s+<span class="c' . s:id . '">\([^<]*\)</span>+\1+g'
  121.       8
  122.     endif
  123.   endwhile
  124. *** ../vim60.119/src/version.c    Mon Jan  7 14:08:11 2002
  125. --- src/version.c    Mon Jan  7 22:30:22 2002
  126. ***************
  127. *** 608,609 ****
  128. --- 608,611 ----
  129.   {   /* Add new patch number below this line */
  130. + /**/
  131. +     120,
  132.   /**/
  133.  
  134. -- 
  135. BEDEVERE: Look!  It's the old man from scene 24 - what's he Doing here?
  136. ARTHUR:   He is the keeper of the Bridge.  He asks each traveler five
  137.           questions ...
  138. GALAHAD:  Three questions.
  139.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  140.  
  141.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  142. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  143.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  144.