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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e9f4e6b7e443f5f0ae16ff97d7e381935a289e8ef8c385d93dfd961f24437ed
4
- data.tar.gz: 489c935af4f12623485a48eaa88fe4ebcadb94185c711e5b5ded10dffad7cc51
3
+ metadata.gz: 6e4ee7e59fec1befc24c65b8943b4e88867464c25d49c0b4852c29641e904606
4
+ data.tar.gz: b0fb71dd07e4116c8650e475f4ea045d976ba327db9bd3bf79cc7ec550418cdd
5
5
  SHA512:
6
- metadata.gz: bc3fe4f3598f41a12210e61859cc2ee804f9606bb22684e9d6efba05b1cf379b14f77ad33685e2843b4a28785588aa94ecd8b94a3db93d31f65667af608bcdca
7
- data.tar.gz: 509b26791611400e61917a5ff53195ad7077d34c78e055a546e6bf024d0420b9300720b18b74a8f05c12960c7a1aea67f5065e34979616313e060314dceef31f
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
 
@@ -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: false
154
+ hard_wrap: settings.hard_wrap
154
155
  ).to_html
155
156
 
156
157
  # Restore non-numeric footnote labels: Kramdown converts all footnote
@@ -1,3 +1,3 @@
1
1
  module MarkdownServer
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdownr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dunn