markdownr 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/markdownr +5 -0
- data/lib/markdown_server/app.rb +2 -1
- data/lib/markdown_server/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e4ee7e59fec1befc24c65b8943b4e88867464c25d49c0b4852c29641e904606
|
|
4
|
+
data.tar.gz: b0fb71dd07e4116c8650e475f4ea045d976ba327db9bd3bf79cc7ec550418cdd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c892d119b73cce17d1b066e3d9ea621922d084d6d6577af6b75cd186d9a3d5b56a6579d2b14967827c07d5335855a04a55e4260347ba97b03535f3500eac1716
|
|
7
|
+
data.tar.gz: 1072d404d1b459932afcb3fab9b7d8bea43a517ece76e3b2f96d64d8ecd356de59658f0d67063b239b7e0cb3d8a965463e6c06c02a677b878dc4bdd8ce6f1167
|
data/bin/markdownr
CHANGED
|
@@ -27,6 +27,10 @@ OptionParser.new do |opts|
|
|
|
27
27
|
options[:link_tooltips] = false
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
opts.on("--standard-newlines", "Use standard markdown newlines (two newlines = paragraph; default is Obsidian-style where single newlines become line breaks)") do
|
|
31
|
+
options[:hard_wrap] = false
|
|
32
|
+
end
|
|
33
|
+
|
|
30
34
|
opts.on("-v", "--version", "Show version") do
|
|
31
35
|
puts "markdownr #{MarkdownServer::VERSION}"
|
|
32
36
|
exit
|
|
@@ -45,6 +49,7 @@ MarkdownServer::App.set :root_dir, dir
|
|
|
45
49
|
MarkdownServer::App.set :custom_title, options[:title]
|
|
46
50
|
MarkdownServer::App.set :allow_robots, options[:allow_robots] || false
|
|
47
51
|
MarkdownServer::App.set :link_tooltips, options.fetch(:link_tooltips, true)
|
|
52
|
+
MarkdownServer::App.set :hard_wrap, options.fetch(:hard_wrap, true)
|
|
48
53
|
MarkdownServer::App.set :port, options[:port]
|
|
49
54
|
MarkdownServer::App.set :bind, options[:bind]
|
|
50
55
|
|
data/lib/markdown_server/app.rb
CHANGED
|
@@ -20,6 +20,7 @@ module MarkdownServer
|
|
|
20
20
|
set :custom_title, nil
|
|
21
21
|
set :allow_robots, false
|
|
22
22
|
set :link_tooltips, true
|
|
23
|
+
set :hard_wrap, true
|
|
23
24
|
set :show_exceptions, false
|
|
24
25
|
set :protection, false
|
|
25
26
|
set :host_authorization, { permitted_hosts: [] }
|
|
@@ -150,7 +151,7 @@ module MarkdownServer
|
|
|
150
151
|
input: "GFM",
|
|
151
152
|
syntax_highlighter: "rouge",
|
|
152
153
|
syntax_highlighter_opts: { default_lang: "text" },
|
|
153
|
-
hard_wrap:
|
|
154
|
+
hard_wrap: settings.hard_wrap
|
|
154
155
|
).to_html
|
|
155
156
|
|
|
156
157
|
# Restore non-numeric footnote labels: Kramdown converts all footnote
|