DEV: Remove .es6 extensions from core (#14912)

Still supported in plugins though.
This commit is contained in:
Jarek Radosz
2021-11-13 12:51:53 +01:00
committed by GitHub
parent cb3cb96149
commit 4ad77f3382
63 changed files with 16 additions and 20 deletions

View File

@ -0,0 +1,31 @@
const rule = {
tag: "details",
before: function (state, tagInfo) {
const attrs = tagInfo.attrs;
state.push("bbcode_open", "details", 1);
state.push("bbcode_open", "summary", 1);
let token = state.push("text", "", 0);
token.content = attrs["_default"] || "";
state.push("bbcode_close", "summary", -1);
},
after: function (state) {
state.push("bbcode_close", "details", -1);
},
};
export function setup(helper) {
helper.allowList([
"summary",
"summary[title]",
"details",
"details[open]",
"details.elided",
]);
helper.registerPlugin((md) => {
md.block.bbcode.ruler.push("details", rule);
});
}