File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
app/concepts/matestack/ui/core/del Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
- %del {@tag_attributes}
1
+ %del {@tag_attributes.merge({:cite = > options[:cite], :datetime => options[:datetime]}) }
2
2
- if options[:text].nil? && block_given?
3
3
= yield
4
4
- else
Original file line number Diff line number Diff line change @@ -9,10 +9,16 @@ The HTML del tag implemented in ruby.
9
9
This component can take 2 optional configuration params and either yield content or display what gets passed to the ` text ` configuration param.
10
10
11
11
#### # id (optional)
12
- Expects a string with all ids the span should have.
12
+ Expects a string with all ids the del should have.
13
13
14
14
#### # class (optional)
15
- Expects a string with all classes the span should have.
15
+ Expects a string with all classes the del should have.
16
+
17
+ #### # cite (optional)
18
+ Expects a string with a URL to a document that explains the reason why the text was deleted.
19
+
20
+ #### # datetime (optional)
21
+ Expects a string which specifies the date and time of when the text was deleted.
16
22
17
23
## Example 1: Yield a given block
18
24
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def response
28
28
static_output = page . html
29
29
30
30
expected_static_output = <<~HTML
31
- < del > I am simple</ del >
31
+ < del cite ='' datetime ='' > I am simple</ del >
32
32
< del id ="my-id " class ="my-class "> I am enhanced</ del >
33
33
HTML
34
34
@@ -56,7 +56,7 @@ def response
56
56
static_output = page . html
57
57
58
58
expected_static_output = <<~HTML
59
- < del > I am simple</ del >
59
+ < del cite ='' datetime ='' > I am simple</ del >
60
60
< del id ="my-id " class ="my-class "> I am enhanced</ del >
61
61
HTML
62
62
You can’t perform that action at this time.
0 commit comments