redcarpet-form-extension 0.1.3 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11312fec7ad1df0858270e89746f1b738e4856e6085a357f7a9aacd0560ad2ff
4
- data.tar.gz: 534980c595765c799c375a78bd28162cdfe17388d5d223b4bf73a71bc0b31355
3
+ metadata.gz: '04784500442b55459e454027f39baf7db8ebf23078bf21ff27f0435330a0df23'
4
+ data.tar.gz: 4aab43096cb5d4c9783036bcd02497223858964d46339523784ab8760972d80e
5
5
  SHA512:
6
- metadata.gz: b2a3a907394ce2ae818c15845162cf90439e7e573fd0cd13ca076b68da96d221193edfe526363e673703116e42f01856a044493055697dbdb6adf4b95bff63f7
7
- data.tar.gz: a8e5038dbfb8871bb35beaaea1fcd0c3de5f35a8532aeb775361f3a7c0812d582a792c9196ed3b6c86017f3bbdcef9022234f6fe03c6712c680321522e4b0938
6
+ metadata.gz: 9f0487ef8559826e785571798d309a02446c5388d3ff178621919c92a995017f201006485f4e29dae4c1e47293cfb8ae90f88cfcc2d15edf637167f78a481966
7
+ data.tar.gz: 901dfd62ea1bc57a60d9505ecd8516962788f5444e871990c157d4ddf0a512218eedc55cf81fa20d29f2e3ab65f1d2fdea652f8db56525d3e728804eb71e081a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redcarpet-form-extension (0.1.3)
4
+ redcarpet-form-extension (0.2.0)
5
5
  redcarpet (~> 3.5.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -27,10 +27,10 @@ markdown = Redcarpet::Markdown.new(Redcarpet::Form::Extension::Render::HTML)
27
27
 
28
28
  ### Input (inline)
29
29
 
30
- Use the follwoing snap code to add an input tag in your html. By default, tag attributes are `type="text" name=""` but you can use `{}` to pass the attributes you need:
30
+ Use the follwoing snap code to add an input tag in your html. By default, tag attributes are `type="text" name="[random_string]"` but you can use `{}` to pass the attributes you need:
31
31
 
32
32
  ```txt
33
- Some text before ____{ type="number" } and after.
33
+ Some text before [input]{ type="number" } and after.
34
34
  ```
35
35
 
36
36
  Returns:
@@ -44,7 +44,7 @@ Returns:
44
44
  Also, you can create your fieldset of checkboxes:
45
45
 
46
46
  ```text
47
- []{value="bike"} I have a bike [x]{value="car"} I have a car [x]{value="boat"} I have a boat
47
+ []{ value="bike" } I have a bike [x]{ value="car" } I have a car [x]{ value="boat" } I have a boat
48
48
  ```
49
49
 
50
50
  This snap returns the following HTML:
@@ -86,7 +86,7 @@ which will return:
86
86
  Finally, a textarea can be generated using the follwing snap:
87
87
 
88
88
  ```txt
89
- [textarea]{value="Hello world!" rows="4" cols="10"} Text box
89
+ [textarea]{ value="Hello world!" rows="4" cols="10" } Text box
90
90
  ```
91
91
 
92
92
  The HTML result is:
@@ -6,7 +6,7 @@ module Redcarpet
6
6
  module Block
7
7
  # A textarea block
8
8
  #
9
- # Ex: [textarea]{value="Hello world!" rows="4" cols="10"} Text box
9
+ # Ex: [textarea]{ value="Hello world!" rows="4" cols="10" } Text box
10
10
  # <fieldset>
11
11
  # <label>Text box</label>
12
12
  # <textarea name="123456" rows="4" cols="10">
@@ -6,11 +6,11 @@ module Redcarpet
6
6
  module Inline
7
7
  # A single input tag
8
8
  #
9
- # Ex: ____{ type="number" }
9
+ # Ex: [input]{ type="number" }
10
10
  # <input type="number" name="" />
11
11
  class Input
12
12
  def self.pattern
13
- /(____)(\{(.+)\})?/
13
+ /\[input\]([{][^}]*[}])?/
14
14
  end
15
15
 
16
16
  def self.default_attributes
@@ -3,7 +3,7 @@
3
3
  module Redcarpet
4
4
  module Form
5
5
  module Extension
6
- VERSION = '0.1.3'
6
+ VERSION = '0.2.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redcarpet-form-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sofia Sousa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-13 00:00:00.000000000 Z
11
+ date: 2022-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet