mmarkdown 0.0.6 → 0.0.7

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: 73317ef3141f225d7a7bbf1e065f67decbb7d75a
4
- data.tar.gz: daf74cb04a7d90eb092bd97d514f9df4b8cb92e8
3
+ metadata.gz: d990b8d6e63571648d6303a66ed508272b67f132
4
+ data.tar.gz: c46eaad8a0f50ed7fef341349b7299a5de798e5b
5
5
  SHA512:
6
- metadata.gz: 0b836dd27ca1070e50ca86706a3e98efd109f0100fd1fdd298ee727e614f6a1f6c8c7b45cad915aed25e105d1241511fd6423d9ecb73057462d582d6cd6010ad
7
- data.tar.gz: 79dfc3e16639cbfa7094ccb936952d418c6ba40553624243a0283b764b4fff80d8743a07a12b727082067d947b504e3c958785f43fe21ca38840e5cea88431cc
6
+ metadata.gz: 11290f0c30d6ab56c53f532e59eeaca63b40b357baa10f87c2072164a8804c6b6d731ad78481aa8d07f2199dda2cf94b80ad23a1be5b1ac4bee576b76dcb013f
7
+ data.tar.gz: 1d033224938323da53c17bd35e9c9d1303e59c8159a8f83016fe773c7b4d046c9b94a91a7ee86477fba5d759ca0300ecf34982d4de401e564677338a65e82ecd
@@ -2,7 +2,7 @@
2
2
  class MMarkdown
3
3
  VERSION_MAJOR = 0
4
4
  VERSION_MINOR = 0
5
- VERSION_REVISION = 6
5
+ VERSION_REVISION = 7
6
6
 
7
7
  VERSION = "#{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_REVISION}"
8
8
  end
data/lib/mmarkdown.rb CHANGED
@@ -34,11 +34,11 @@ class MMarkdown
34
34
  equations = []
35
35
 
36
36
  string_mathml = string.clone
37
- string.scan(/\\\[(.*)\\\]/) {|m|
37
+ string.scan(/\\\[(.*?)\\\]/) {|m|
38
38
  string_mathml.gsub!("\\[" + m.first + "\\]", m.first.to_mathml(true).to_s)
39
39
  }
40
40
 
41
- string.scan(/\\\((.*)\\\)/) {|m|
41
+ string.scan(/\\\((.*?)\\\)/) {|m|
42
42
  string_mathml.gsub!("\\(" + m.first + "\\)", m.first.to_mathml.to_s)
43
43
  }
44
44
 
data/test/test.html CHANGED
@@ -4,7 +4,8 @@
4
4
 
5
5
  <h2 id="equation">Equation</h2>
6
6
 
7
- <p>This is an equation, <math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><msup><mi>x</mi><mn>2</mn></msup><mo stretchy='false'>+</mo><msup><mi>y</mi><mn>2</mn></msup><mo stretchy='false'>=</mo><msup><mi>r</mi><mn>2</mn></msup></math></p>
7
+ <p>This is an equation. <math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><msup><mi>x</mi><mn>2</mn></msup><mo stretchy='false'>+</mo><msup><mi>y</mi><mn>2</mn></msup><mo stretchy='false'>=</mo><msup><mi>r</mi><mn>2</mn></msup></math>,
8
+ (<math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><mi>x</mi><mo stretchy='false'>=</mo><mi>r</mi><mi>cos</mi><mi>&theta;</mi></math> and <math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><mi>y</mi><mo stretchy='false'>=</mo><mi>r</mi><mi>sin</mi><mi>&theta;</mi></math>).</p>
8
9
 
9
10
  <p>And this is the second
10
11
  <math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><msup><mi>sin</mi><mn>2</mn></msup><mi>&theta;</mi><mo stretchy='false'>+</mo><msup><mi>cos</mi><mn>2</mn></msup><mi>&theta;</mi><mo stretchy='false'>=</mo><mn>1</mn></math>.</p>
data/test/test.md CHANGED
@@ -3,7 +3,8 @@
3
3
  This is a test data
4
4
 
5
5
  ## Equation
6
- This is an equation, \( x^2 + y^2 = r^2 \)
6
+ This is an equation. \( x^2 + y^2 = r^2 \),
7
+ (\( x = r \cos \theta \) and \( y = r \sin \theta \)).
7
8
 
8
9
  And this is the second
9
10
  \( \sin^2 \theta + \cos^2 \theta = 1 \).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mmarkdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyuki Tanaka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-18 00:00:00.000000000 Z
11
+ date: 2014-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet