mark_maker 0.5.0 → 0.5.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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +1 -2
- data/bin/generate_readme.rb +8 -8
- data/lib/mark_maker/generator.rb +3 -3
- data/lib/mark_maker/version.rb +1 -1
- data/test/minitest_helper.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd856055ec57459656c6963b82423f55febfe440
|
4
|
+
data.tar.gz: 355e6e14d071a9d53a9f2fd4333896ab1e0253b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95a31758ca8963bebd1080210c333c0ffc7d29767ffeaed3151a7cf92c5cd8bbacaa7788ad359c73efb9db943c735d5e8564eb7ddb2a2cbf47c1d6986203b075
|
7
|
+
data.tar.gz: 351deb838b05b55f91f1a40991de02e297ed08bbc795a7ffb73cf7d9dad0c74648f26337fb88dcf9cd8a012aa860be5402be3e2906331ae1b136f7053f73f383
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -204,8 +204,7 @@ content = <<-QUOTE
|
|
204
204
|
If you want to quote, you'll get a quote.
|
205
205
|
Warning, it will just quote line by line, not break it up nicely.
|
206
206
|
QUOTE
|
207
|
-
puts gen.block_quote(*content.
|
208
|
-
"))
|
207
|
+
puts gen.block_quote(*content.lines)
|
209
208
|
```
|
210
209
|
|
211
210
|
Produces the markdown ...
|
data/bin/generate_readme.rb
CHANGED
@@ -108,7 +108,7 @@ puts ""
|
|
108
108
|
puts "Standard markdown code blocks and #{gen.code_span('code span')} are supported, as well as github"
|
109
109
|
puts "flavored markdown fenced code blocks."
|
110
110
|
puts ""
|
111
|
-
sample_block = <<-EOT.
|
111
|
+
sample_block = <<-EOT.lines
|
112
112
|
some_code = [ "# add it up",
|
113
113
|
"total = [1, 2, 3, 4].inject do |sum, i|",
|
114
114
|
" sum += i",
|
@@ -154,14 +154,14 @@ table_code = <<-EOT
|
|
154
154
|
puts gen.table_row("Second", "BC", "$14.00")
|
155
155
|
puts gen.table_row("Third", "DEFGH", "$1,034.50")
|
156
156
|
EOT
|
157
|
-
puts gen.code_block(*table_code.
|
157
|
+
puts gen.code_block(*table_code.lines)
|
158
158
|
puts ""
|
159
159
|
puts "Produces this terribly ugly markdown ..."
|
160
160
|
puts ""
|
161
161
|
table_markdown = capture_stdout do
|
162
162
|
eval(table_code)
|
163
163
|
end
|
164
|
-
puts gen.fenced_code_block(*table_markdown.string.
|
164
|
+
puts gen.fenced_code_block(*table_markdown.string.lines)
|
165
165
|
puts ""
|
166
166
|
puts "Or, you can pass all the rows in at once like so ..."
|
167
167
|
puts ""
|
@@ -175,12 +175,12 @@ pretty_table_code = <<-EOT
|
|
175
175
|
]
|
176
176
|
puts gen.table(*table_data)
|
177
177
|
EOT
|
178
|
-
puts gen.fenced_code_language('ruby', *pretty_table_code.
|
178
|
+
puts gen.fenced_code_language('ruby', *pretty_table_code.lines)
|
179
179
|
puts "And get nicely justified markdown like this ..."
|
180
180
|
pretty_table_markdown = capture_stdout do
|
181
181
|
eval(pretty_table_code)
|
182
182
|
end
|
183
|
-
puts gen.fenced_code_block(*pretty_table_markdown.string.
|
183
|
+
puts gen.fenced_code_block(*pretty_table_markdown.string.lines)
|
184
184
|
puts "Which gives you this stunning HTML table ..."
|
185
185
|
puts ""
|
186
186
|
puts eval(pretty_table_code)
|
@@ -192,16 +192,16 @@ content = <<-QUOTE
|
|
192
192
|
If you want to quote, you'll get a quote.
|
193
193
|
Warning, it will just quote line by line, not break it up nicely.
|
194
194
|
QUOTE
|
195
|
-
puts gen.block_quote(*content.
|
195
|
+
puts gen.block_quote(*content.lines)
|
196
196
|
EOT
|
197
|
-
puts gen.fenced_code_block(*block_quote_code.
|
197
|
+
puts gen.fenced_code_block(*block_quote_code.lines)
|
198
198
|
puts ""
|
199
199
|
puts "Produces the markdown ..."
|
200
200
|
puts ""
|
201
201
|
block_quote_markdown = capture_stdout do
|
202
202
|
eval(block_quote_code)
|
203
203
|
end
|
204
|
-
puts gen.fenced_code_block(*block_quote_markdown.string.
|
204
|
+
puts gen.fenced_code_block(*block_quote_markdown.string.lines)
|
205
205
|
puts ""
|
206
206
|
puts ""
|
207
207
|
puts "Which looks like this when viewed as HTML..."
|
data/lib/mark_maker/generator.rb
CHANGED
@@ -189,12 +189,12 @@ module MarkMaker
|
|
189
189
|
end
|
190
190
|
end
|
191
191
|
|
192
|
+
# split the cell in two and then add the fill character
|
193
|
+
# to the end of the first half of the cell to reach the
|
194
|
+
# justified width
|
192
195
|
def fill_justify(fill, *content)
|
193
196
|
width = column_width(*content)
|
194
197
|
content.map do |c|
|
195
|
-
# split the cell in two and then add the fill character
|
196
|
-
# to the end of the first half of the cell to reach the
|
197
|
-
# justified width
|
198
198
|
c.insert(c.length / 2, fill * (width - c.length))
|
199
199
|
end
|
200
200
|
end
|
data/lib/mark_maker/version.rb
CHANGED
data/test/minitest_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mark_maker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Schneider
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|