@@ -1058,7 +1058,7 class RedCloth3 < String | |||
|
1058 | 1058 | end |
|
1059 | 1059 | end |
|
1060 | 1060 | |
|
1061 | def rip_offtags( text, escape_aftertag=true ) | |
|
1061 | def rip_offtags( text, escape_aftertag=true, escape_line=true ) | |
|
1062 | 1062 | if text =~ /<.*>/ |
|
1063 | 1063 | ## strip and encode <pre> content |
|
1064 | 1064 | codepre, used_offtags = 0, {} |
@@ -1068,7 +1068,7 class RedCloth3 < String | |||
|
1068 | 1068 | codepre += 1 |
|
1069 | 1069 | used_offtags[offtag] = true |
|
1070 | 1070 | if codepre - used_offtags.length > 0 |
|
1071 | htmlesc( line, :NoQuotes ) | |
|
1071 | htmlesc( line, :NoQuotes ) if escape_line | |
|
1072 | 1072 | @pre_list.last << line |
|
1073 | 1073 | line = "" |
|
1074 | 1074 | else |
@@ -1086,7 +1086,7 class RedCloth3 < String | |||
|
1086 | 1086 | end |
|
1087 | 1087 | elsif $1 and codepre > 0 |
|
1088 | 1088 | if codepre - used_offtags.length > 0 |
|
1089 | htmlesc( line, :NoQuotes ) | |
|
1089 | htmlesc( line, :NoQuotes ) if escape_line | |
|
1090 | 1090 | @pre_list.last << line |
|
1091 | 1091 | line = "" |
|
1092 | 1092 | end |
@@ -57,7 +57,7 module Redmine | |||
|
57 | 57 | def extract_sections(index) |
|
58 | 58 | @pre_list = [] |
|
59 | 59 | text = self.dup |
|
60 | rip_offtags text, false | |
|
60 | rip_offtags text, false, false | |
|
61 | 61 | before = '' |
|
62 | 62 | s = '' |
|
63 | 63 | after = '' |
@@ -284,6 +284,11 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.", | |||
|
284 | 284 | end |
|
285 | 285 | </code></pre> |
|
286 | 286 | |
|
287 | <pre><code><pre><code class=\"ruby\"> | |
|
288 | Place your code here. | |
|
289 | </code></pre> | |
|
290 | </code></pre> | |
|
291 | ||
|
287 | 292 | Morbi facilisis accumsan orci non pharetra. |
|
288 | 293 | |
|
289 | 294 | <pre> |
General Comments 0
You need to be logged in to leave comments.
Login now