daimon-markdown 0.1.0 → 0.2.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: 50f1024b283dae59703639438ea079cdd02d997a
4
- data.tar.gz: 90bc18433e7e8bdb97b054232558da6c1788543c
3
+ metadata.gz: 4e20e55ed32a19fb66f20fdbead98a4b47861e17
4
+ data.tar.gz: 1ce624b14e5eabeff31dd59b61880964b39d2108
5
5
  SHA512:
6
- metadata.gz: 059181727a629fa3fbf6e4bda5b21ee986ed7db32fac7f9c7d092d12d66e72647c61d4375f516aaf375f6b2e02fc258171ed7feab95e5ee0fb14e08c093fec35
7
- data.tar.gz: 83cb0864ab8c2ee81da57e6134ae4b2321f061bcc21868dd969151e472f57aaa5378b2263e746266bfd59d6d043355d34b97119cdba6743909a6e17a93d91323
6
+ metadata.gz: 9bab7bef899fe56780ca7ed03161da612b11c4391556bc89d90e30e2a5295120e45bcf989d0c27ce42694594c7f4be5bf8bc840e7f2f52814825710cd82db52f
7
+ data.tar.gz: 03abedc0dbad66b922b5d4bde77d2a6f41eebcee28a765412dd3260748a7459dece2d5da8f9ce92abf23536b0487d9835554698ea532fdbc8c71c2b2cd0396a0
data/.travis.yml CHANGED
@@ -2,7 +2,6 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.3.0
6
5
  - 2.3.1
7
6
  notifications:
8
7
  slack:
data/README.md CHANGED
@@ -57,14 +57,13 @@ Use 2 backslashes if you want to use commands start with backslash.
57
57
 
58
58
  Currently support LaTeX and AsciiMath.
59
59
 
60
- ```
60
+ ```text
61
61
  # Inline style
62
62
 
63
63
  This is a expression {{math("$1 + 1 = 2$")}}. And {{math("$2^10 = 1024$")}} .
64
64
 
65
65
  # Block style
66
66
 
67
- ```
68
67
  {{math("$$
69
68
  \\begin{aligned}
70
69
  \\dot{x} & = \\sigma(y-x) \\\\
@@ -6,15 +6,15 @@ require 'daimon/markdown/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "daimon-markdown"
8
8
  spec.version = Daimon::Markdown::VERSION
9
- spec.authors = ["Kenji Okimoto"]
10
- spec.email = ["okimoto@clear-code.com"]
9
+ spec.authors = ["daimon developers"]
10
+ spec.email = [""]
11
11
 
12
12
  spec.summary = %q{Markdown renderer for Daimon}
13
13
  spec.description = %q{Markdown renderer for Daimon}
14
14
  spec.homepage = "https://github.com/bm-sms/daimon-markdown"
15
15
  spec.license = "MIT"
16
16
 
17
- spec.required_ruby_version = ">= 2.2.0"
17
+ spec.required_ruby_version = ">= 2.3.0"
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
20
  spec.bindir = "bin"
@@ -14,9 +14,8 @@ module Daimon
14
14
  private
15
15
 
16
16
  def markdown
17
- renderer = Daimon::Markdown::Redcarpet::HTMLRenderer.new(hard_wrap: true)
18
17
  @markdown ||= ::Redcarpet::Markdown.new(
19
- renderer,
18
+ Daimon::Markdown::Redcarpet::HTMLRenderer.new(hard_wrap: true),
20
19
  fenced_code_blocks: true,
21
20
  tables: true)
22
21
  end
@@ -5,11 +5,7 @@ module Daimon
5
5
  Plugin.register("math", self)
6
6
 
7
7
  def self.script_tag
8
- <<~TAG
9
- <script type="text/javascript"
10
- async
11
- src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
12
- </script>
8
+ tag = <<~TAG
13
9
  <script type="text/x-mathjax-config">
14
10
  MathJax.Hub.Config({
15
11
  tex2jax: {inlineMath: [['$','$']]},
@@ -17,7 +13,16 @@ module Daimon
17
13
  TeX: {extensions: ["mhchem.js"]}
18
14
  });
19
15
  </script>
16
+ <script type="text/javascript"
17
+ async
18
+ src="https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_CHTML">
19
+ </script>
20
20
  TAG
21
+ if tag.respond_to?(:html_safe)
22
+ tag.html_safe
23
+ else
24
+ tag
25
+ end
21
26
  end
22
27
 
23
28
  def call(expression)
@@ -1,5 +1,5 @@
1
1
  module Daimon
2
2
  module Markdown
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daimon-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
- - Kenji Okimoto
7
+ - daimon developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html-pipeline
@@ -110,7 +110,7 @@ dependencies:
110
110
  version: '0'
111
111
  description: Markdown renderer for Daimon
112
112
  email:
113
- - okimoto@clear-code.com
113
+ - ''
114
114
  executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
@@ -149,7 +149,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 2.2.0
152
+ version: 2.3.0
153
153
  required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  requirements:
155
155
  - - ">="