@@ -272,7 +272,7 class RedCloth3 < String | |||||
272 | @shelf = [] |
|
272 | @shelf = [] | |
273 | textile_rules = [:refs_textile, :block_textile_table, :block_textile_lists, |
|
273 | textile_rules = [:refs_textile, :block_textile_table, :block_textile_lists, | |
274 | :block_textile_prefix, :inline_textile_image, :inline_textile_link, |
|
274 | :block_textile_prefix, :inline_textile_image, :inline_textile_link, | |
275 | :inline_textile_code, :inline_textile_span] |
|
275 | :inline_textile_code, :inline_textile_span, :glyphs_textile] | |
276 | markdown_rules = [:refs_markdown, :block_markdown_setext, :block_markdown_atx, :block_markdown_rule, |
|
276 | markdown_rules = [:refs_markdown, :block_markdown_setext, :block_markdown_atx, :block_markdown_rule, | |
277 | :block_markdown_bq, :block_markdown_lists, |
|
277 | :block_markdown_bq, :block_markdown_lists, | |
278 | :inline_markdown_reflink, :inline_markdown_link] |
|
278 | :inline_markdown_reflink, :inline_markdown_link] | |
@@ -684,7 +684,7 class RedCloth3 < String | |||||
684 | alias textile_h6 textile_p |
|
684 | alias textile_h6 textile_p | |
685 |
|
685 | |||
686 | def textile_fn_( tag, num, atts, cite, content ) |
|
686 | def textile_fn_( tag, num, atts, cite, content ) | |
687 | atts << " id=\"fn#{ num }\"" |
|
687 | atts << " id=\"fn#{ num }\" class=\"footnote\"" | |
688 | content = "<sup>#{ num }</sup> #{ content }" |
|
688 | content = "<sup>#{ num }</sup> #{ content }" | |
689 | atts = shelve( atts ) if atts |
|
689 | atts = shelve( atts ) if atts | |
690 | "\t<p#{ atts }>#{ content }</p>" |
|
690 | "\t<p#{ atts }>#{ content }</p>" | |
@@ -1010,7 +1010,7 class RedCloth3 < String | |||||
1010 |
|
1010 | |||
1011 | def glyphs_textile( text, level = 0 ) |
|
1011 | def glyphs_textile( text, level = 0 ) | |
1012 | if text !~ HASTAG_MATCH |
|
1012 | if text !~ HASTAG_MATCH | |
1013 | pgl text |
|
1013 | #pgl text | |
1014 | footnote_ref text |
|
1014 | footnote_ref text | |
1015 | else |
|
1015 | else | |
1016 | codepre = 0 |
|
1016 | codepre = 0 |
@@ -163,6 +163,7 li p {margin-top: 0;} | |||||
163 | div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;} |
|
163 | div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;} | |
164 | p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;} |
|
164 | p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;} | |
165 | p.subtitle { font-size: 0.9em; margin: -6px 0 12px 0; font-style: italic; } |
|
165 | p.subtitle { font-size: 0.9em; margin: -6px 0 12px 0; font-style: italic; } | |
|
166 | p.footnote { font-size: 0.9em; margin-top: 0px; margin-bottom: 0px; } | |||
166 |
|
167 | |||
167 | fieldset#filters, fieldset#date-range { padding: 0.7em; margin-bottom: 8px; } |
|
168 | fieldset#filters, fieldset#date-range { padding: 0.7em; margin-bottom: 8px; } | |
168 | fieldset#filters p { margin: 1.2em 0 0.8em 2px; } |
|
169 | fieldset#filters p { margin: 1.2em 0 0.8em 2px; } | |
@@ -272,6 +273,7 input#time_entry_comments { width: 90%;} | |||||
272 |
|
273 | |||
273 | #attachments_fields input[type=text] {margin-left: 8px; } |
|
274 | #attachments_fields input[type=text] {margin-left: 8px; } | |
274 |
|
275 | |||
|
276 | div.attachments { margin-top: 12px; } | |||
275 | div.attachments p { margin:4px 0 2px 0; } |
|
277 | div.attachments p { margin:4px 0 2px 0; } | |
276 | div.attachments img { vertical-align: middle; } |
|
278 | div.attachments img { vertical-align: middle; } | |
277 | div.attachments span.author { font-size: 0.9em; color: #888; } |
|
279 | div.attachments span.author { font-size: 0.9em; color: #888; } |
@@ -219,6 +219,21 class ApplicationHelperTest < HelperTestCase | |||||
219 | assert_equal '<p>Dashes: ---</p>', textilizable('Dashes: ---') |
|
219 | assert_equal '<p>Dashes: ---</p>', textilizable('Dashes: ---') | |
220 | end |
|
220 | end | |
221 |
|
221 | |||
|
222 | def test_footnotes | |||
|
223 | raw = <<-RAW | |||
|
224 | This is some text[1]. | |||
|
225 | ||||
|
226 | fn1. This is the foot note | |||
|
227 | RAW | |||
|
228 | ||||
|
229 | expected = <<-EXPECTED | |||
|
230 | <p>This is some text<sup><a href=\"#fn1\">1</a></sup>.</p> | |||
|
231 | <p id="fn1" class="footnote"><sup>1</sup> This is the foot note</p> | |||
|
232 | EXPECTED | |||
|
233 | ||||
|
234 | assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') | |||
|
235 | end | |||
|
236 | ||||
222 | def test_table_of_content |
|
237 | def test_table_of_content | |
223 | raw = <<-RAW |
|
238 | raw = <<-RAW | |
224 | {{toc}} |
|
239 | {{toc}} |
General Comments 0
You need to be logged in to leave comments.
Login now