We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd like to have a possibility to disable emoji conversion in <code> blocks.
<code>
The text was updated successfully, but these errors were encountered:
I solved this issue in my own code with:
function replace_emoji() { let elementsToReplace = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, li, table'); let elementsToIgnore = document.querySelectorAll('code'); for (let i = 0; i < elementsToReplace.length; i++) { replace_emoji_in_node(elementsToReplace[i]); } function replace_emoji_in_node(node) { if (node.constructor === Text) { node.data = emoji.replace_colons(node.data); } else if (node.constructor === HTMLScriptElement || [].indexOf.call(elementsToIgnore, node) >= 0) { return; } else { let childNodes = node.childNodes; for (let i = 0; i < childNodes.length; i++) { replace_emoji_in_node(childNodes[i]); } } } }
Sorry, something went wrong.
No branches or pull requests
I'd like to have a possibility to disable emoji conversion in
<code>
blocks.The text was updated successfully, but these errors were encountered: