chore: remove unused plugin and lerna package (#41258)

This commit is contained in:
Oliver Eyton-Williams
2021-02-25 15:38:45 +01:00
committed by GitHub
parent b73022c81b
commit 24209a3629
5 changed files with 1 additions and 68 deletions

View File

@ -1,26 +0,0 @@
const visit = require('unist-util-visit');
const emojiRE = /^:[a-z_]+:$/;
function markdownToHTML(node) {
const { url, title, alt } = node;
const html = `
<img
alt="${alt}"
class="forum-image"
src="${url}"
title="${title}"
>
`;
return Object.assign(node, {
type: 'html',
value: html
});
}
module.exports = function forumEmojiPlugin({ markdownAST }) {
visit(markdownAST, 'image', imageNode =>
emojiRE.test(imageNode.title) ? markdownToHTML(imageNode) : imageNode
);
};

View File

@ -1,5 +0,0 @@
{
"name": "gatsby-remark-fcc-forum-emoji",
"version": "0.0.1",
"lockfileVersion": 1
}

View File

@ -1,5 +0,0 @@
{
"name": "gatsby-remark-fcc-forum-emoji",
"private": true,
"version": "0.0.1"
}