docwu 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/docwu/render.rb +31 -1
- data/lib/docwu/version.rb +1 -1
- data/lib/template_files/Gemfile +1 -1
- metadata +4 -4
data/lib/docwu/render.rb
CHANGED
@@ -37,10 +37,40 @@ module Docwu
|
|
37
37
|
|
38
38
|
case marktype
|
39
39
|
when 'markdown'
|
40
|
-
_mark_options = [
|
40
|
+
_mark_options = [
|
41
|
+
:hard_wrap,
|
42
|
+
:autolink,
|
43
|
+
:no_intraemphasis,
|
44
|
+
:fenced_code,
|
45
|
+
:gh_blockcode,
|
46
|
+
:tables,
|
47
|
+
:footnotes,
|
48
|
+
:superscript,
|
49
|
+
:underline,
|
50
|
+
:strikethrough,
|
51
|
+
:space_after_headers,
|
52
|
+
:quote,
|
53
|
+
:highlight
|
54
|
+
]
|
41
55
|
|
42
56
|
_html = ::RedcarpetCompat.new(content_text, *_mark_options).to_html
|
43
57
|
|
58
|
+
# markdown = Redcarpet::Markdown.new(
|
59
|
+
# Redcarpet::Render::HTML,
|
60
|
+
# :autolink => true,
|
61
|
+
# :space_after_headers => true, # 头部必须有个空格
|
62
|
+
# :fenced_code_blocks => true, # ```括起来的代码段落
|
63
|
+
# :strikethrough => true, # ~~ 删除
|
64
|
+
# :superscript => true,
|
65
|
+
# :underline => true,
|
66
|
+
# :highlight => true,
|
67
|
+
# :quote => true,
|
68
|
+
# :footnotes => true,
|
69
|
+
# :hard_wrap => true
|
70
|
+
# )
|
71
|
+
|
72
|
+
# _html = markdown.render(content_text)
|
73
|
+
|
44
74
|
# 获取一个html代码的目录结果
|
45
75
|
_catalogs_result = ::Docwu::Utils.html_catalogable(_html)
|
46
76
|
|
data/lib/docwu/version.rb
CHANGED
data/lib/template_files/Gemfile
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docwu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redcarpet
|
@@ -154,7 +154,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
segments:
|
156
156
|
- 0
|
157
|
-
hash:
|
157
|
+
hash: 1246911035850330828
|
158
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
159
|
none: false
|
160
160
|
requirements:
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: '0'
|
164
164
|
segments:
|
165
165
|
- 0
|
166
|
-
hash:
|
166
|
+
hash: 1246911035850330828
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project:
|
169
169
|
rubygems_version: 1.8.25
|