]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.144
- removed conflict with 6.2.259
[packages/vim.git] / 6.2.144
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.144
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.2.144
11 Problem:    When "g:html_use_css" is set the HTML header generated by the
12             2html script is wrong.
13 Solution:   Add the header after adding HREF for links.
14             Also use ":normal!" instead of ":normal" to avoid mappings
15             getting in the way.
16 Files:      runtime/syntax/2html.vim
17
18
19 *** ../vim-6.2.143/runtime/syntax/2html.vim     Sat May 31 20:59:11 2003
20 --- runtime/syntax/2html.vim    Sun Nov  2 17:44:26 2003
21 ***************
22 *** 1,6 ****
23   " Vim syntax support file
24   " Maintainer: Bram Moolenaar <Bram@vim.org>
25 ! " Last Change: 2003 May 31
26   "            (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>)
27   
28   " Transform a file into HTML, using the current syntax highlighting.
29 --- 1,6 ----
30   " Vim syntax support file
31   " Maintainer: Bram Moolenaar <Bram@vim.org>
32 ! " Last Change: 2003 Nov 02
33   "            (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>)
34   
35   " Transform a file into HTML, using the current syntax highlighting.
36 ***************
37 *** 180,205 ****
38   let s:old_magic = &magic
39   set magic
40   
41 - " The DTD
42 - if exists("html_use_css")
43 -   exe "normal a<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n    \"http://www.w3.org/TR/html4/strict.dtd\">\n\e"
44 - endif
45
46   " HTML header, with the title and generator ;-). Left free space for the CSS,
47   " to be filled at the end.
48 ! exe "normal a<html>\n<head>\n<title>\e"
49 ! exe "normal a" . expand("%:p:~") . "</title>\n\e"
50 ! exe "normal a<meta name=\"Generator\" content=\"Vim/" . version/100 . "." . version %100 . "\">\n\e"
51   if s:html_encoding != ""
52 !   exe "normal a<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:html_encoding . "\">\n\e"
53   endif
54   if exists("html_use_css")
55 !   exe "normal a<style type=\"text/css\">\n<!--\n-->\n</style>\n\e"
56   endif
57   if exists("html_no_pre")
58 !   exe "normal a</head>\n<body>\n\e"
59   else
60 !   exe "normal a</head>\n<body>\n<pre>\n\e"
61   endif
62   
63   wincmd p
64 --- 180,200 ----
65   let s:old_magic = &magic
66   set magic
67   
68   " HTML header, with the title and generator ;-). Left free space for the CSS,
69   " to be filled at the end.
70 ! exe "normal! a<html>\n<head>\n<title>\e"
71 ! exe "normal! a" . expand("%:p:~") . "</title>\n\e"
72 ! exe "normal! a<meta name=\"Generator\" content=\"Vim/" . version/100 . "." . version %100 . "\">\n\e"
73   if s:html_encoding != ""
74 !   exe "normal! a<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:html_encoding . "\">\n\e"
75   endif
76   if exists("html_use_css")
77 !   exe "normal! a<style type=\"text/css\">\n<!--\n-->\n</style>\n\e"
78   endif
79   if exists("html_no_pre")
80 !   exe "normal! a</head>\n<body>\n\e"
81   else
82 !   exe "normal! a</head>\n<body>\n<pre>\n\e"
83   endif
84   
85   wincmd p
86 ***************
87 *** 281,295 ****
88     if exists("html_no_pre")
89       let s:new = substitute(s:new, '  ', '\&nbsp;\&nbsp;', 'g') . '<br>'
90     endif
91 !   exe "normal \<C-W>pa" . strtrans(s:new) . "\n\e\<C-W>p"
92     let s:lnum = s:lnum + 1
93     +
94   endwhile
95   " Finish with the last line
96   if exists("html_no_pre")
97 !   exe "normal \<C-W>pa\n</body>\n</html>\e"
98   else
99 !   exe "normal \<C-W>pa</pre>\n</body>\n</html>\e"
100   endif
101   
102   
103 --- 276,290 ----
104     if exists("html_no_pre")
105       let s:new = substitute(s:new, '  ', '\&nbsp;\&nbsp;', 'g') . '<br>'
106     endif
107 !   exe "normal! \<C-W>pa" . strtrans(s:new) . "\n\e\<C-W>p"
108     let s:lnum = s:lnum + 1
109     +
110   endwhile
111   " Finish with the last line
112   if exists("html_no_pre")
113 !   exe "normal! \<C-W>pa\n</body>\n</html>\e"
114   else
115 !   exe "normal! \<C-W>pa</pre>\n</body>\n</html>\e"
116   endif
117   
118   
119 ***************
120 *** 313,324 ****
121   " incorrect.
122   if exists("html_use_css")
123     if exists("html_no_pre")
124 !     execute "normal A\nbody { color: " . s:fgc . "; background-color: " . s:bgc . "; font-family: Courier, monospace; }\e"
125     else
126 !     execute "normal A\npre { color: " . s:fgc . "; background-color: " . s:bgc . "; }\e"
127       yank
128       put
129 !     execute "normal ^cwbody\e"
130     endif
131   else
132     if exists("html_no_pre")
133 --- 308,319 ----
134   " incorrect.
135   if exists("html_use_css")
136     if exists("html_no_pre")
137 !     execute "normal! A\nbody { color: " . s:fgc . "; background-color: " . s:bgc . "; font-family: Courier, monospace; }\e"
138     else
139 !     execute "normal! A\npre { color: " . s:fgc . "; background-color: " . s:bgc . "; }\e"
140       yank
141       put
142 !     execute "normal! ^cwbody\e"
143     endif
144   else
145     if exists("html_no_pre")
146 ***************
147 *** 331,337 ****
148   " Line numbering attributes
149   if s:numblines
150     if exists("html_use_css")
151 !     execute "normal A\n.lnr { " . s:CSS1(hlID("LineNr")) . "}\e"
152     else
153       execute '%s+<span class="lnr">\([^<]*\)</span>+' . s:HtmlOpening(hlID("LineNr")) . '\1' . s:HtmlClosing(hlID("LineNr")) . '+g'
154     endif
155 --- 326,332 ----
156   " Line numbering attributes
157   if s:numblines
158     if exists("html_use_css")
159 !     execute "normal! A\n.lnr { " . s:CSS1(hlID("LineNr")) . "}\e"
160     else
161       execute '%s+<span class="lnr">\([^<]*\)</span>+' . s:HtmlOpening(hlID("LineNr")) . '\1' . s:HtmlClosing(hlID("LineNr")) . '+g'
162     endif
163 ***************
164 *** 350,356 ****
165     " its occurences to make the HTML shorter
166     if s:attr != ""
167       if exists("html_use_css")
168 !       execute "normal A\n." . s:id_name . " { " . s:attr . "}"
169       else
170         execute '%s+<span class="' . s:id_name . '">\([^<]*\)</span>+' . s:HtmlOpening(s:id) . '\1' . s:HtmlClosing(s:id) . '+g'
171       endif
172 --- 345,351 ----
173     " its occurences to make the HTML shorter
174     if s:attr != ""
175       if exists("html_use_css")
176 !       execute "normal! A\n." . s:id_name . " { " . s:attr . "}"
177       else
178         execute '%s+<span class="' . s:id_name . '">\([^<]*\)</span>+' . s:HtmlOpening(s:id) . '\1' . s:HtmlClosing(s:id) . '+g'
179       endif
180 ***************
181 *** 361,367 ****
182   endwhile
183   
184   " Add hyperlinks
185 ! %s+\(http://\S\{-}\)\(\([.,;:]\=\(\s\|$\)\)\|[\\"'<>]\)+<A HREF="\1">\1</A>\2+ge
186   
187   " Cleanup
188   %s:\s\+$::e
189 --- 356,367 ----
190   endwhile
191   
192   " Add hyperlinks
193 ! %s+\(http://\S\{-}\)\(\([.,;:]\=\(\s\|$\)\)\|[\\"'<>]\|&gt;\|&lt;\)+<A HREF="\1">\1</A>\2+ge
194
195 ! " The DTD
196 ! if exists("html_use_css")
197 !   exe "normal! ggi<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\e"
198 ! endif
199   
200   " Cleanup
201   %s:\s\+$::e
202 *** ../vim-6.2.143/src/version.c        Sun Nov  2 15:49:56 2003
203 --- src/version.c       Sun Nov  2 17:48:30 2003
204 ***************
205 *** 639,640 ****
206 --- 639,642 ----
207   {   /* Add new patch number below this line */
208 + /**/
209 +     144,
210   /**/
211
212 -- 
213 Violators can be fined, arrested or jailed for making ugly faces at a dog.
214                 [real standing law in Oklahoma, United States of America]
215
216  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
217 ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
218 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
219  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
This page took 0.036439 seconds and 3 git commands to generate.