github-markup 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY.md +5 -0
- data/README.md +3 -3
- data/lib/github/commands/rest2html +2 -1
- data/lib/github/markup/version.rb +1 -1
- data/lib/github/markups.rb +1 -1
- data/test/markup_test.rb +1 -1
- data/test/markups/README.rst.txt +13 -0
- data/test/markups/README.rst.txt.html +14 -0
- metadata +4 -2
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -17,11 +17,11 @@ Once your script is in place, edit `lib/github/markups.rb` and tell
|
|
17
17
|
GitHub Markup about it. Again we look to [rest2html][r2hc] for
|
18
18
|
guidance:
|
19
19
|
|
20
|
-
command(:rest2html, /
|
20
|
+
command(:rest2html, /re?st(.txt)?/)
|
21
21
|
|
22
22
|
Here we're telling GitHub Markup of the existence of a `rest2html`
|
23
|
-
command which should be used for any file ending in `rest
|
24
|
-
`rst`. Any regular expression will do.
|
23
|
+
command which should be used for any file ending in `rest`,
|
24
|
+
`rst`, `rest.txt` or `rst.txt`. Any regular expression will do.
|
25
25
|
|
26
26
|
Finally add your tests. Create a `README.extension` in `test/markups`
|
27
27
|
along with a `README.extension.html`. As you may imagine, the
|
data/lib/github/markups.rb
CHANGED
data/test/markup_test.rb
CHANGED
@@ -6,7 +6,7 @@ require 'test/unit'
|
|
6
6
|
class MarkupTest < Test::Unit::TestCase
|
7
7
|
Dir['test/markups/README.*'].each do |readme|
|
8
8
|
next if readme =~ /html$/
|
9
|
-
markup = readme.split('
|
9
|
+
markup = readme.split('/').last.gsub(/^README\./, '')
|
10
10
|
|
11
11
|
define_method "test_#{markup}" do
|
12
12
|
expected = File.read("#{readme}.html")
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="document">
|
2
|
+
<div class="section" id="header-1">
|
3
|
+
<h1>Header 1</h1>
|
4
|
+
<p>Example text.</p>
|
5
|
+
<div class="section" id="header-2">
|
6
|
+
<h2>Header 2</h2>
|
7
|
+
<ol class="arabic simple">
|
8
|
+
<li>Blah blah <tt class="docutils literal">code</tt> blah</li>
|
9
|
+
<li>More <tt class="docutils literal">code</tt>, hooray</li>
|
10
|
+
</ol>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-markup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-22 00:00:00 -07:00
|
13
13
|
default_executable: github-markup
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -54,6 +54,8 @@ files:
|
|
54
54
|
- test/markups/README.rdoc.html
|
55
55
|
- test/markups/README.rst
|
56
56
|
- test/markups/README.rst.html
|
57
|
+
- test/markups/README.rst.txt
|
58
|
+
- test/markups/README.rst.txt.html
|
57
59
|
- test/markups/README.textile
|
58
60
|
- test/markups/README.textile.html
|
59
61
|
- test/markups/README.txt
|