home *** CD-ROM | disk | FTP | other *** search
- To: vim-dev@vim.org
- Subject: Patch 6.0.120
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- MIME-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- ------------
-
- Patch 6.0.120
- Problem: The conversion to html isn't compatible with XHTML.
- Solution: Quote the values. (Jess Thrysoee)
- Files: runtime/syntax/2html.vim
-
-
- *** ../vim60.119/runtime/syntax/2html.vim Sun Sep 2 14:43:04 2001
- --- runtime/syntax/2html.vim Mon Jan 7 22:24:33 2002
- ***************
- *** 1,6 ****
- " Vim syntax support file
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- ! " Last Change: 2001 Sep 02
- " (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>)
-
- " Transform a file into HTML, using the current syntax highlighting.
- --- 1,6 ----
- " Vim syntax support file
- " Maintainer: Bram Moolenaar <Bram@vim.org>
- ! " Last Change: 2001 Dec 12
- " (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>)
-
- " Transform a file into HTML, using the current syntax highlighting.
- ***************
- *** 71,77 ****
- let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
- let a = a . '<span style="background-color: ' . ( x != "" ? x : s:fgc ) . '">'
- let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
- ! let a = a . '<font color="' . ( if x != "" ? x : s:bgc ) . '">'
- else
- let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
- if x != "" | let a = a . '<span style="background-color: ' . x . '">' | endif
- --- 71,77 ----
- let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
- let a = a . '<span style="background-color: ' . ( x != "" ? x : s:fgc ) . '">'
- let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
- ! let a = a . '<font color="' . ( x != "" ? x : s:bgc ) . '">'
- else
- let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
- if x != "" | let a = a . '<span style="background-color: ' . x . '">' | endif
- ***************
- *** 184,190 ****
- let s:new = ""
-
- if s:numblines
- ! let s:new = '<span class=lnr>' . strpart(' ', 0, strlen(line("$")) - strlen(s:lnum)) . s:lnum . '</span> '
- endif
-
- " Loop over each character in the line
- --- 184,190 ----
- let s:new = ""
-
- if s:numblines
- ! let s:new = '<span class="lnr">' . strpart(' ', 0, strlen(line("$")) - strlen(s:lnum)) . s:lnum . '</span> '
- endif
-
- " Loop over each character in the line
- ***************
- *** 199,205 ****
-
- " Output the text with the same synID, with class set to c{s:id}
- let s:id = synIDtrans(s:id)
- ! 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>'
- " Add the class to class list if it's not there yet
- if stridx(s:idlist, "," . s:id . ",") == -1
- let s:idlist = s:idlist . s:id . ","
- --- 199,205 ----
-
- " Output the text with the same synID, with class set to c{s:id}
- let s:id = synIDtrans(s:id)
- ! 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>'
- " Add the class to class list if it's not there yet
- if stridx(s:idlist, "," . s:id . ",") == -1
- let s:idlist = s:idlist . s:id . ","
- ***************
- *** 252,258 ****
- if exists("html_use_css")
- execute "normal A\n.lnr { " . s:CSS1(highlightID("LineNr")) . "}\e"
- else
- ! execute '%s+<span class=lnr>\([^<]*\)</span>+' . s:HtmlOpening(highlightID("LineNr")) . '\1' . s:HtmlClosing(highlightID("LineNr")) . '+g'
- endif
- endif
-
- --- 252,258 ----
- if exists("html_use_css")
- execute "normal A\n.lnr { " . s:CSS1(highlightID("LineNr")) . "}\e"
- else
- ! execute '%s+<span class="lnr">\([^<]*\)</span>+' . s:HtmlOpening(highlightID("LineNr")) . '\1' . s:HtmlClosing(highlightID("LineNr")) . '+g'
- endif
- endif
-
- ***************
- *** 270,279 ****
- if exists("html_use_css")
- execute "normal A\n.c" . s:id . " { " . s:attr . "}"
- else
- ! execute '%s+<span class=c' . s:id . '>\([^<]*\)</span>+' . s:HtmlOpening(s:id) . '\1' . s:HtmlClosing(s:id) . '+g'
- endif
- else
- ! execute '%s+<span class=c' . s:id . '>\([^<]*\)</span>+\1+g'
- 8
- endif
- endwhile
- --- 270,279 ----
- if exists("html_use_css")
- execute "normal A\n.c" . s:id . " { " . s:attr . "}"
- else
- ! execute '%s+<span class="c' . s:id . '">\([^<]*\)</span>+' . s:HtmlOpening(s:id) . '\1' . s:HtmlClosing(s:id) . '+g'
- endif
- else
- ! execute '%s+<span class="c' . s:id . '">\([^<]*\)</span>+\1+g'
- 8
- endif
- endwhile
- *** ../vim60.119/src/version.c Mon Jan 7 14:08:11 2002
- --- src/version.c Mon Jan 7 22:30:22 2002
- ***************
- *** 608,609 ****
- --- 608,611 ----
- { /* Add new patch number below this line */
- + /**/
- + 120,
- /**/
-
- --
- BEDEVERE: Look! It's the old man from scene 24 - what's he Doing here?
- ARTHUR: He is the keeper of the Bridge. He asks each traveler five
- questions ...
- GALAHAD: Three questions.
- "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
-
- /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\
- ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
- \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
-