Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commitdb0b215
committed
Fix alt and caption handling in Sphinx directives
We currently template new reST to be re-parsed after the plot iscreated, but incorrectly copied the `alt` and `caption` values when theywere wrapped.Additionally, change `figmpl` to use Sphinx/docutils' tag creationfunctions. These functions correctly escape attributes and so fixesinvalid HTML when alt text contains quotes.1 parent0b7a88a commitdb0b215
File tree
4 files changed
+53
-44
lines changed- lib/matplotlib
- sphinxext
- tests
- tinypages
4 files changed
+53
-44
lines changedLines changed: 38 additions & 40 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
19 |
| - | |
20 | 15 |
| |
21 | 16 |
| |
22 | 17 |
| |
23 | 18 |
| |
24 | 19 |
| |
| 20 | + | |
| 21 | + | |
| 22 | + | |
25 | 23 |
| |
26 | 24 |
| |
27 | 25 |
| |
| |||
193 | 191 |
| |
194 | 192 |
| |
195 | 193 |
| |
| 194 | + | |
196 | 195 |
| |
197 | 196 |
| |
198 | 197 |
| |
199 |
| - | |
200 | 198 |
| |
201 | 199 |
| |
| 200 | + | |
202 | 201 |
| |
203 | 202 |
| |
204 | 203 |
| |
| |||
214 | 213 |
| |
215 | 214 |
| |
216 | 215 |
| |
217 |
| - | |
| 216 | + | |
218 | 217 |
| |
219 |
| - | |
220 | 218 |
| |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
| 219 | + | |
| 220 | + | |
230 | 221 |
| |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
249 | 246 |
| |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
255 | 253 |
| |
256 | 254 |
| |
257 | 255 |
| |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
876 | 876 |
| |
877 | 877 |
| |
878 | 878 |
| |
879 |
| - | |
| 879 | + | |
880 | 880 |
| |
881 | 881 |
| |
882 | 882 |
| |
| |||
896 | 896 |
| |
897 | 897 |
| |
898 | 898 |
| |
| 899 | + | |
| 900 | + | |
| 901 | + | |
899 | 902 |
| |
900 | 903 |
| |
901 | 904 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
86 |
| - | |
87 |
| - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 |
| |
89 | 92 |
| |
90 | 93 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
138 |
| - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
139 | 144 |
| |
140 | 145 |
| |
141 | 146 |
| |
|
0 commit comments
Comments
(0)