Skip to content
New issue

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

fix: gemoji #884

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/parsers/gemoji.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('gemoji parser', () => {
expect(tree.children[0].children[1]).toMatchInlineSnapshot(`
{
"name": "joy",
"type": "emoji",
"type": "gemoji",
"value": "😂",
}
`);
Expand Down
2 changes: 1 addition & 1 deletion enums.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export enum NodeTypes {
callout = 'rdme-callout',
codeTabs = 'code-tabs',
emoji = 'emoji',
gemoji = 'gemoji',
i = 'i',
image = 'image',
htmlBlock = 'html-block',
Expand Down
2 changes: 1 addition & 1 deletion processor/compile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function compilers() {

const handlers = {
[NodeTypes.callout]: callout,
[NodeTypes.emoji]: gemoji,
[NodeTypes.gemoji]: gemoji,
[NodeTypes.codeTabs]: codeTabs,
[NodeTypes.embed]: embed,
[NodeTypes.htmlBlock]: htmlBlock,
Expand Down
4 changes: 2 additions & 2 deletions processor/transform/gemoji+.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const regex = /:(?<name>\+1|[-\w]+):/g;

const gemojiReplacer = (_, name: string) => {
switch (Owlmoji.kind(name)) {
case 'gemoji': {
case NodeTypes.gemoji: {
const node: Gemoji = {
type: NodeTypes.emoji,
type: NodeTypes.gemoji,
value: Owlmoji.nameToEmoji[name],
name,
};
Expand Down
Loading