markdownr 0.6.17 → 0.7.0
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 +8 -13
- data/lib/markdown_server/app.rb +38 -1025
- data/lib/markdown_server/helpers/admin_helpers.rb +42 -0
- data/lib/markdown_server/helpers/fetch_helpers.rb +178 -0
- data/lib/markdown_server/helpers/formatting_helpers.rb +78 -0
- data/lib/markdown_server/helpers/markdown_helpers.rb +216 -0
- data/lib/markdown_server/helpers/path_helpers.rb +40 -0
- data/lib/markdown_server/helpers/search_helpers.rb +157 -0
- data/lib/markdown_server/plugin.rb +14 -2
- data/lib/markdown_server/plugins/bible_citations/helpers.rb +365 -0
- data/lib/markdown_server/plugins/bible_citations/plugin.rb +27 -3
- data/lib/markdown_server/version.rb +1 -1
- metadata +8 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 19a2cd0d721b3dc1f53ae1d064b78e6f7ade715092bccb57cdd8b2b56c00152b
|
|
4
|
+
data.tar.gz: 96e0930a7215b8706ec1b59bd6c927c6e1612a15c40b7a94bc4f588d8e5364ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: acd320649054e144b400a20f92e66dbb999ecea0a7f29b1fe33f1b1408bd9c70fae1c170cc2f5c9485e847e59ad7796172eda8da869d270bb87ff60e2cc178f5
|
|
7
|
+
data.tar.gz: 4fed410b97722c3e7239ef5c21288d34f8a6875ba9197b3bcc1483bd2a68211282946a0d8f154a048c46b8ac68060a835526045bce333bc8c795cd3bca094fff
|
data/bin/markdownr
CHANGED
|
@@ -48,20 +48,14 @@ OptionParser.new do |opts|
|
|
|
48
48
|
options[:verbose] = true
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
opts.on("--
|
|
51
|
+
opts.on("--plugin NAME", "Enable a plugin by name (can be specified multiple times)") do |name|
|
|
52
52
|
options[:plugin_overrides] = (options[:plugin_overrides] || {}).merge(
|
|
53
|
-
|
|
53
|
+
name => (options.dig(:plugin_overrides, name) || {}).merge("enabled" => true)
|
|
54
54
|
)
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
opts.on("--
|
|
58
|
-
options[:
|
|
59
|
-
"bible_citations" => (options.dig(:plugin_overrides, "bible_citations") || {}).merge("link_target" => "biblegateway")
|
|
60
|
-
)
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
opts.on("--dictionary-url URL", "URL to dictionary.json for Strong's number popup resolution") do |u|
|
|
64
|
-
options[:dictionary_url] = u
|
|
57
|
+
opts.on("--plugin-dir DIR", "Additional directory containing plugins (can be specified multiple times)") do |d|
|
|
58
|
+
(options[:plugin_dirs] ||= []) << d
|
|
65
59
|
end
|
|
66
60
|
|
|
67
61
|
opts.on("-v", "--version", "Show version") do
|
|
@@ -90,7 +84,7 @@ MarkdownServer::App.set :port, options[:port]
|
|
|
90
84
|
MarkdownServer::App.set :bind, options[:bind]
|
|
91
85
|
MarkdownServer::App.set :server_settings, { max_threads: options[:threads], min_threads: 1 }
|
|
92
86
|
MarkdownServer::App.set :plugin_overrides, options[:plugin_overrides] || {}
|
|
93
|
-
MarkdownServer::App.set :
|
|
87
|
+
MarkdownServer::App.set :plugin_dirs, options[:plugin_dirs] || []
|
|
94
88
|
|
|
95
89
|
# Load .markdownr.yml popup settings
|
|
96
90
|
config_path = File.join(dir, ".markdownr.yml")
|
|
@@ -103,8 +97,9 @@ if File.exist?(config_path)
|
|
|
103
97
|
MarkdownServer::App.set :popup_external, popups.fetch("external", true)
|
|
104
98
|
MarkdownServer::App.set :popup_external_domains, popups.fetch("external_domains", [])
|
|
105
99
|
end
|
|
106
|
-
if yaml && yaml["
|
|
107
|
-
MarkdownServer::App.
|
|
100
|
+
if yaml && yaml["plugin_dirs"].is_a?(Array)
|
|
101
|
+
existing = MarkdownServer::App.settings.plugin_dirs
|
|
102
|
+
MarkdownServer::App.set :plugin_dirs, (yaml["plugin_dirs"] + existing).uniq
|
|
108
103
|
end
|
|
109
104
|
end
|
|
110
105
|
|