md2key 0.5.0 → 0.5.1

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
  SHA1:
3
- metadata.gz: 28d015849054d2a590b378c0cc9b2f264a512f2a
4
- data.tar.gz: f8ee2819fc70e399307cb661714f361368eef24f
3
+ metadata.gz: 5a4a8a15e795cb012a1ab056caa02dfe34672b12
4
+ data.tar.gz: e0ed66c03aea32312bc75a6a305d72d56cb733b3
5
5
  SHA512:
6
- metadata.gz: 6cbc3372b60e6a90b6aa78b35864429361e7e62c4a2417990bca2cc4d02ce90e79da403d2df4fe8ba70358caffe93fdfd090e3978e58d0e9dcd363eb156d80e5
7
- data.tar.gz: 113be3fa091632a54984f0eb2b18216f75b0af9a2829881d338ddef29284f453ecfb4736163597015557036397c114c6c1eabdeb35e52d0b5233e9d53c0d55e3
6
+ metadata.gz: 985d2448e312c48f15041c6935ecc7cf16c7d61942f537cb1acb2e1ee072f5c53412e22a08289c0702293cebc3b9210c8d0f9d5d4ddda545100eddd69de01f82
7
+ data.tar.gz: 90a63f9d4143c0500a02a4079b579f1f7e0002f91728225fe25f931e1b177d6b61cf34b19444afecb75ed78096c0621b11f919fabeb05d6fa05322618a116289
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # v0.5.1
2
+
3
+ - Escape HTML in markdown
4
+ - https://github.com/k0kubun/md2key/issues/15
5
+ - Thanks to @liubin
6
+ - Avoid using shell to execute AppleScript
7
+ - https://github.com/k0kubun/md2key/issues/16
8
+ - Thanks to @liubin
9
+
1
10
  # v0.5.0
2
11
 
3
12
  - Support nested list
@@ -85,9 +85,10 @@ module Md2key
85
85
  execute_applescript('paste_and_indent', indent, insert_newline)
86
86
  end
87
87
 
88
+ # @return [String] - script's output
88
89
  def execute_applescript(script_name, *args)
89
90
  path = script_path(script_name)
90
- `osascript #{path} "#{args.join('" "')}"`
91
+ IO.popen(['osascript', path, *args.map(&:to_s)], &:read)
91
92
  end
92
93
 
93
94
  def script_path(script_name)
@@ -98,7 +98,9 @@ module Md2key
98
98
 
99
99
  def to_xhtml(markdown)
100
100
  redcarpet = Redcarpet::Markdown.new(
101
- Redcarpet::Render::XHTML,
101
+ Redcarpet::Render::XHTML.new(
102
+ escape_html: true,
103
+ ),
102
104
  fenced_code_blocks: true,
103
105
  )
104
106
  redcarpet.render(markdown)
@@ -1,3 +1,3 @@
1
1
  module Md2key
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: md2key
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun