inplace_editing 0.4.4 → 0.4.5

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: 4eda694589f21f2d02dae5604277228604edff8f
4
- data.tar.gz: 9c519b02c3c2fcbb0744564d6405732f5dcfdff6
3
+ metadata.gz: 482dcb3130b440b5958e36943bf8e27aa875d86d
4
+ data.tar.gz: 641fe4f5a36db8d6c2f11324c4433b2592f12d4b
5
5
  SHA512:
6
- metadata.gz: 2f058e85aec359fb35abf48f1b0b75def15b2844f4ff175cd52f5925a4582d7f06c93a1e66e059692457eaf9fbb7d69ad724d2f658bc862c1d3c366d3ad04ba3
7
- data.tar.gz: fcb2fafec8fae7c6721509e01c72f5468ce99024e735a0c90cac9b3ffb3098cbf453555b7331a718ddea08940a7f75e9108122bec420911d2dea80f73f574caa
6
+ metadata.gz: dc19ed882521e9151ea93d777b97abc5e61563076195a8600eb7c6e35a226f777b01d2b97810eed35bcf2cdc5568c09dd776fa4f656d16054e925e334912d69e
7
+ data.tar.gz: c302d306db44e91a80fff9ac88a53ff5b6100f81b41a4a67baea46bb64c062beaf8140227d3990d47a000ef86a98e705a945a8232dd365b29cc119a83a041470
@@ -60,16 +60,21 @@ module InplaceEditingHelper
60
60
  end
61
61
  end
62
62
 
63
- def markdown(text, placeholder = '[texto aqui]')
63
+ def markdown(text, placeholder = '[texto aqui]', options = nil)
64
64
  return placeholder if !text
65
- options = {
65
+ default_options = {
66
66
  filter_html: false,
67
- hard_wrap: true,
67
+ hard_wrap: true,
68
68
  link_attributes: { rel: 'nofollow', target: "_blank" },
69
- space_after_headers: true,
69
+ space_after_headers: true,
70
70
  fenced_code_blocks: true,
71
71
  tables: true
72
72
  }
73
+ if options
74
+ options = default_options.merge(options)
75
+ else
76
+ options = default_options
77
+ end
73
78
 
74
79
  extensions = {
75
80
  autolink: true,
@@ -1,3 +1,3 @@
1
1
  module InplaceEditing
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inplace_editing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique Rangel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-15 00:00:00.000000000 Z
11
+ date: 2017-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler