File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
lib/qiita/markdown/transformers Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
## Unreleased
2
2
3
+ - Avoid sanitizing attributes related to footnotes
4
+
3
5
## 1.0.1
4
6
5
7
- Chenge qiita_marker from development dependency to runtime dependency
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
1
3
module Qiita
2
4
module Markdown
3
5
module Transformers
@@ -7,6 +9,7 @@ class FilterAttributes
7
9
"class" => %w[ autolink ] ,
8
10
"rel" => %w[ footnote url ] ,
9
11
"rev" => %w[ footnote ] ,
12
+ "id" => /\A fnref-.+\z / ,
10
13
} ,
11
14
"blockquote" => {
12
15
"class" => Embed ::Tweet ::CLASS_NAME ,
@@ -17,15 +20,18 @@ class FilterAttributes
17
20
"p" => {
18
21
"class" => Embed ::CodePen ::CLASS_NAME ,
19
22
} ,
23
+ "section" => {
24
+ "class" => %w[ footnotes ] ,
25
+ } ,
20
26
"sup" => {
21
27
"id" => /\A fnref\d +\z / ,
22
28
} ,
23
29
"li" => {
24
- "id" => /\A fn\d +\z / ,
30
+ "id" => /\A fn. +\z / ,
25
31
} ,
26
32
} . freeze
27
33
28
- DELIMITER = " " . freeze
34
+ DELIMITER = " "
29
35
30
36
def self . call ( **args )
31
37
new ( **args ) . transform
You can’t perform that action at this time.
0 commit comments