mato 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 +4 -4
- data/Gemfile +1 -1
- data/README.md +12 -6
- data/lib/mato/config.rb +3 -3
- data/lib/mato/document.rb +1 -1
- data/lib/mato/version.rb +1 -1
- data/mato.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 267a8ba9de0057c636442e480e5a1f714053fd74
|
4
|
+
data.tar.gz: 1f712541459bdfd13d3e3fb06d028e74e97daabb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5c98659f58a6d9b14ba67e64391c65b437f8a3da079f4bf6b3e7c6e42995a324f12d4806431906828b6ab42328c5a07f3cd8ce3a156542206fa4482554f3b8e
|
7
|
+
data.tar.gz: b5103f9005d068465350f405391b730a2490dc54fb81fdfbb118dcd8973265945deb8d5f0d6656171e1d04f26666f6a467cf3ff68639f06574592b652d98178d
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# Mato
|
1
|
+
# Mato [![Build Status](https://travis-ci.org/bitjourney/mato.svg?branch=master)](https://travis-ci.org/bitjourney/mato)
|
2
2
|
|
3
|
-
**Mato**, standing for **Ma**rkdown **To**oolkit, is an extensible
|
3
|
+
**Mato**, standing for **Ma**rkdown **To**oolkit, is an extensible, pipeline-based markdown processing toolkit, inspired by [HTML::Pipeline](https://github.com/jch/html-pipeline).
|
4
4
|
|
5
5
|
|
6
6
|
This gem is built on [commonmarker](https://github.com/gjtorikian/commonmarker), a [CommonMark](https://github.com/jgm/CommonMark) implementation,
|
7
|
-
which can parse markdown documents
|
7
|
+
which can parse markdown documents.
|
8
8
|
|
9
9
|
## Synopsis
|
10
10
|
|
@@ -78,9 +78,16 @@ Or install it yourself as:
|
|
78
78
|
|
79
79
|
$ gem install mato
|
80
80
|
|
81
|
-
##
|
81
|
+
## Motivation
|
82
82
|
|
83
|
-
|
83
|
+
The original idea comes from [qiita-markdown](https://github.com/increments/qiita-markdown),
|
84
|
+
a markdown processing tool like mato, based on html-pipeline.
|
85
|
+
|
86
|
+
html-pipeline is a great tool that invents the idea of "pipeline", to filter HTML node (or `Nokogiri::XML::Node`) in each filter. This is safe, fast, and easy to enhance.
|
87
|
+
|
88
|
+
However, html-pipeline is not suitable for cache, esp. context-aware caching.
|
89
|
+
|
90
|
+
(TBD)
|
84
91
|
|
85
92
|
## Optional Dependencies
|
86
93
|
|
@@ -97,7 +104,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
97
104
|
|
98
105
|
Bug reports and pull requests are welcome on GitHub at https://github.com/bitjourney/mato.
|
99
106
|
|
100
|
-
|
101
107
|
## License
|
102
108
|
|
103
109
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/mato/config.rb
CHANGED
@@ -10,14 +10,14 @@ module Mato
|
|
10
10
|
DEFAULT_MARKDOWN_PARSE_OPTIONS = %i[
|
11
11
|
DEFAULT
|
12
12
|
VALIDATE_UTF8
|
13
|
-
]
|
13
|
+
].freeze
|
14
14
|
|
15
15
|
# https://github.com/gjtorikian/commonmarker#render-options
|
16
16
|
DEFAULT_MARKDOWN_RENDER_OPTIONS = [
|
17
17
|
:DEFAULT,
|
18
18
|
:HARDBREAKS, # convert "\n" as <br/>
|
19
19
|
# :SOURCEPOS, // TODO: enable it after assertions are supported
|
20
|
-
]
|
20
|
+
].freeze
|
21
21
|
|
22
22
|
# https://github.com/github/cmark/tree/master/extensions
|
23
23
|
DEFAULT_MARKDOWN_EXTENSIONS = %i[
|
@@ -25,7 +25,7 @@ module Mato
|
|
25
25
|
strikethrough
|
26
26
|
autolink
|
27
27
|
tagfilter
|
28
|
-
]
|
28
|
+
].freeze
|
29
29
|
|
30
30
|
# @return [Array<Proc>]
|
31
31
|
attr_accessor :text_filters
|
data/lib/mato/document.rb
CHANGED
data/lib/mato/version.rb
CHANGED
data/mato.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["goro-fuj@bitjoureny.com"]
|
10
10
|
|
11
11
|
spec.summary = 'MArkdown TOolkit'
|
12
|
-
spec.description = '
|
12
|
+
spec.description = 'A pipeline-based markdown toolkit with CommonMark(er)'
|
13
13
|
spec.homepage = "https://github.com/bitjourney/mato"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FUJI Goro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '10.0'
|
69
|
-
description:
|
69
|
+
description: A pipeline-based markdown toolkit with CommonMark(er)
|
70
70
|
email:
|
71
71
|
- goro-fuj@bitjoureny.com
|
72
72
|
executables: []
|