Skip to content

Conversation

@fleesk
Copy link
Contributor

@fleesk fleesk commented Sep 25, 2025

The current implementation of remove-emojis.lua removes tokens in the pandoc tree that are just single or double colons. For example, the file

A : B
**A**: B

is transformed into

A B
**A**B

The shortest github emojis are 3 characters (including the colons), so removing anything shorter than that won't match them. By only removing strings that start & end with ":" and are at least 3 characters long, the output for situations like the example above is fixed and includes the colons.

To more accuractely remove only github emoji and no other tokens surrounded by colons, you could make use of https://api.github.com/emojis to get an up-to-date list, but that might be a bit overkill.

@kdheepak kdheepak merged commit 846b4c6 into kdheepak:main Sep 26, 2025
@kdheepak
Copy link
Owner

Thanks for the PR! I imagine using length like that for emojis may cause issues with some emojis though. But this is a good fix for now :)

@fleesk fleesk deleted the fix-emoji-colons branch September 26, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants