Skip to content

Commit bdb490b

Browse files
committed
Merge pull request github#454 from github/mediawiki-codepre
Resolve issues with the `tt` tag in MediaWiki
2 parents 5716bc1 + 828a250 commit bdb490b

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

lib/github/markups.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
end
2323

2424
markup(:wikicloth, /mediawiki|wiki/) do |content|
25-
WikiCloth::WikiCloth.new(:data => content).to_html(:noedit => true)
25+
wikicloth = WikiCloth::WikiCloth.new(:data => content)
26+
WikiCloth::WikiBuffer::HTMLElement::ESCAPED_TAGS << 'tt'
27+
wikicloth.to_html(:noedit => true)
2628
end
2729

2830
markup(:asciidoctor, /adoc|asc(iidoc)?/) do |content|

test/markups/README.mediawiki

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ __TOC__
66

77
= Red Bridge (JRuby Embed) =
88

9+
<tt>one-<two</tt>
10+
<pre>a-b</pre>
11+
912
JRuby has long had a private embedding API, which was closely tied to the runtime's internals and therefore changed frequently as JRuby evolved. Since version 1.4, however, we have also provided a more stable public API, known as Red Bridge or JRuby Embed. Existing Java programs written to the [[DirectJRubyEmbedding|legacy API]] should still work, but we strongly recommend Red Bridge for all new projects.
1013

1114
== Features of Red Bridge ==

test/markups/README.mediawiki.html

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ <h1>
1818
<a name="Red_Bridge_JRuby_Embed"></a>Red Bridge (JRuby Embed)</h1>
1919

2020

21+
<p><tt>one-&lt;two</tt>
22+
</p><pre>a-b</pre>
23+
2124

2225
<p>JRuby has long had a private embedding API, which was closely tied to the runtime's internals and therefore changed frequently as JRuby evolved. Since version 1.4, however, we have also provided a more stable public API, known as Red Bridge or JRuby Embed. Existing Java programs written to the <a href="DirectJRubyEmbedding">legacy API</a> should still work, but we strongly recommend Red Bridge for all new projects.
2326
</p>

0 commit comments

Comments
 (0)