Skip to content

Commit 7ada410

Browse files
committed
add sanitizing rules
1 parent 286b1e1 commit 7ada410

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

dist/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codex.editor.inline-code",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"keywords": [
55
"codex editor",
66
"inline",

src/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,18 @@ class InlineCode {
166166
get toolboxIcon() {
167167
return '<svg width="19" height="13" viewBox="0 0 19 13" xmlns="http://www.w3.org/2000/svg"><path d="M17.839 5.525a1.105 1.105 0 0 1-.015 1.547l-4.943 4.943a1.105 1.105 0 1 1-1.562-1.562l4.137-4.137-4.078-4.078A1.125 1.125 0 1 1 12.97.648l4.796 4.796c.026.026.05.053.074.08zm-14.952.791l4.137 4.137a1.105 1.105 0 1 1-1.562 1.562L.519 7.072a1.105 1.105 0 0 1-.015-1.547c.023-.028.048-.055.074-.081L5.374.647a1.125 1.125 0 0 1 1.591 1.591L2.887 6.316z" id="a"/></svg>';
168168
}
169+
170+
/**
171+
* Sanitizer rule
172+
* @return {{span: {class: string}}}
173+
*/
174+
get sanitize() {
175+
return {
176+
span: {
177+
class: 'inline-code'
178+
}
179+
};
180+
}
169181
}
170182

171183
module.exports = InlineCode;

0 commit comments

Comments
 (0)