mark_maker 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e37fec34d88890a7ea630f098893de3406e36d5
4
- data.tar.gz: 559ade23be5b4f0e6b8bafc6bd1214b92bc50f1c
3
+ metadata.gz: fe104d472a4262bf1642fcb00e4f35befa6c0af5
4
+ data.tar.gz: 27b3877793ee354426e0019712a69b5f2226061d
5
5
  SHA512:
6
- metadata.gz: 5d7280b3f94618526cc15b48d0c1df9fa8f2bb583373d58191d817ad96607238cc7bc99122f451384abd220e4ba19ad747b718afc70a09541e4f1782c457c81a
7
- data.tar.gz: f94e40b1626b55376496e233bdad3c33efadc84ee1307152888218485d9d79188e6b77efba8c70876c2abd119f3f59766310950c0717d2eff04660b732930149
6
+ metadata.gz: dda6c904f6dcda86b820dc8d4df52ee04132f0bc9b5936cbc19efde9a2df57a74517e088ff6f59f7dfd56a8a2cffcefe729d83c0584e37b3a02afd76cf00368f
7
+ data.tar.gz: a03c38095f9975f2a6b894512a6025f7e8cfa4e5a868c386d8134eaa703936d998fe8c26ef6b4b585a7775b4e0006b68f0904575b5802b57ff27b927d6a84352
data/README.md CHANGED
@@ -23,7 +23,7 @@ Usage
23
23
 
24
24
  MarkMaker provides line oriented conversion of content to markdown elements. It
25
25
  currently supports first, second and third level headings, links, bullets, numbered
26
- bullets and code markdown. See bin/generate_readme.rb for the code used to generate this
26
+ bullets, *emphasis* and code markdown. See bin/generate_readme.rb for the code used to generate this
27
27
  document and a sample of all these markdown generators in action.
28
28
 
29
29
  ### Header Example
@@ -38,7 +38,7 @@ doc << gen.header2("Usage")
38
38
  doc << ""
39
39
  doc << "MarkMaker provides line oriented conversion of content to markdown elements. It"
40
40
  doc << "currently supports first, second and third level headings, links, bullets, numbered"
41
- doc << "bullets and code markdown. See #{__FILE__} for the code used to generate this"
41
+ doc << "bullets, #{gen.emphasis('emphasis')} and code markdown. See #{__FILE__} for the code used to generate this"
42
42
  doc << "document and a sample of all these markdown generators in action."
43
43
  doc << ""
44
44
  doc << gen.header3("Header Example")
@@ -61,5 +61,9 @@ module MarkMaker
61
61
  block.push(*content)
62
62
  block << MarkMaker::FENCE
63
63
  end
64
+
65
+ def emphasis(content)
66
+ "#{MarkMaker::EMPHASIS}#{content}#{MarkMaker::EMPHASIS}"
67
+ end
64
68
  end
65
69
  end
@@ -1,3 +1,3 @@
1
1
  module MarkMaker
2
- VERSION = "0.0.4"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/mark_maker.rb CHANGED
@@ -13,4 +13,5 @@ end
13
13
  # a line by line method.
14
14
  module MarkMaker
15
15
  FENCE = "```"
16
+ EMPHASIS = "*"
16
17
  end
@@ -108,4 +108,11 @@ class TestMarkMaker < Minitest::Test
108
108
  assert(markup.first == MarkMaker::FENCE + lang, "Markup should start with the code fence and the language.")
109
109
  assert(markup.last == MarkMaker::FENCE, "Markup should end with the code fence.")
110
110
  end
111
+
112
+ def test_emphasis
113
+ content = "emphasize this"
114
+ gen = MarkMaker::Generator.new
115
+ markup = gen.emphasis(content)
116
+ assert_match(/^#{Regexp.quote(MarkMaker::EMPHASIS)}#{content}#{Regexp.quote(MarkMaker::EMPHASIS)}$/, markup)
117
+ end
111
118
  end
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.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Schneider
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2015-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler