Remove extra script tag from embedded gists to prevent them from mixing up (#14674)
This commit is contained in:
parent
c3b2883aa3
commit
def5de6d28
1 changed files with 3 additions and 1 deletions
|
|
@ -30,11 +30,13 @@ function getGistTags(nodes) {
|
|||
|
||||
function loadEmbeddedGists(postscribe, gistTags) {
|
||||
for (const gistTag of gistTags) {
|
||||
postscribe(gistTag, gistTag.firstElementChild.outerHTML, {
|
||||
const gistWrapper = gistTag.firstElementChild;
|
||||
postscribe(gistTag, gistWrapper.outerHTML, {
|
||||
beforeWrite(text) {
|
||||
return gistTag.childElementCount > 3 ? '' : text;
|
||||
},
|
||||
});
|
||||
gistWrapper.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue