Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Tag <undefined> appears near emojis #67

Closed
UgRoss opened this issue Mar 5, 2021 · 4 comments · Fixed by florianeckerstorfer/remark-a11y-emoji#20
Closed

Tag <undefined> appears near emojis #67

UgRoss opened this issue Mar 5, 2021 · 4 comments · Fixed by florianeckerstorfer/remark-a11y-emoji#20
Labels
bug Something isn't working

Comments

@UgRoss
Copy link

UgRoss commented Mar 5, 2021

Hello 👋!

Describe the bug
It looks like emojis are not processed correctly when they are used inside the titles.

To Reproduce
Steps to reproduce the behavior:

  1. Create some MDX document
  2. Use titles with emojis. For example, ### ⚒️ Tools
  3. Check rendered result

Expected behavior
There should not be any <undefined /> tags near the title

Screenshots

Here is what I get when I try to parse some MDX document:

CleanShot 2021-03-05 at 11 07 43@2x

config:

{
      resolve: `gatsby-plugin-mdx`,
      options: {
        extensions: [`.md`, `.mdx`],
        gatsbyRemarkPlugins: [
          //....
          'gatsby-remark-a11y-emoji',
        ]
      }
}

Here is how it looks if I just use remark-a11y-emoji:

CleanShot 2021-03-05 at 11 13 35@2x

Config:

{
      resolve: `gatsby-plugin-mdx`,
      options: {
        extensions: [`.md`, `.mdx`],
        gatsbyRemarkPlugins: [
          //....
        ],
        remarkPlugins: [require('@fec/remark-a11y-emoji')],
     }
}

Environment (please complete the following information):

  • OS: Mac OS
  • Node Version: v14.15.1
  • Gatsby Version: ^2.32.8
  • gatsby-plugin-mdx: ^1.10.1
  • Version: ^1.1.0

Additional context
In case you can't represent it, here is the whole MDX config inside the gatsby-config:

   {
      resolve: `gatsby-plugin-mdx`,
      options: {
        extensions: [`.md`, `.mdx`],
        gatsbyRemarkPlugins: [
          { resolve: `gatsby-remark-relative-images` },
          { resolve: 'gatsby-remark-images', options: { maxWidth: 750 } },
          { resolve: 'gatsby-remark-responsive-iframe' },
          `gatsby-remark-prismjs`,
          'gatsby-remark-copy-linked-files',
          'gatsby-remark-a11y-emoji',
          { resolve: 'gatsby-remark-external-links', options: { target: '_blank' } },
        ]
      },
    }
@UgRoss UgRoss added the bug Something isn't working label Mar 5, 2021
@florianeckerstorfer
Copy link
Owner

@UgRoss Thanks for the very detailed bug description. Good news is that @fec/remark-a11y-emoji works correctly and I'm currently planning to deprecate this package and put the gatsby-remark plugin as a thin wrapper into the @fec/remark-a11y-emoji package. I will try to get a version published this weekend and update you here.

UgRoss added a commit to UgRoss/ugross.dev that referenced this issue Mar 5, 2021
@UgRoss
Copy link
Author

UgRoss commented Mar 6, 2021

Got it! Thanks for the explanation! 👍

@florianeckerstorfer
Copy link
Owner

@UgRoss @fec/remark-a11y-emoji v3.1.0 has been released, which now includes a Gatsby plugin.

UgRoss added a commit to UgRoss/ugross.dev that referenced this issue Mar 8, 2021
* ⬆️ Dependencies update

* 🎨 Add default html title

* 🎨 Update footer to use text from siteConfig

* ⚡ Use treeshaking for react-use lib

* ✨ Add MDX support instead of markdown

* 🔥 remove markdownlint

* 🔥 remove deprecated HandheldFriendly meta tag

* ✨ Add MDX support to Post template

* ➖ Remove netlify CMS

* 🐛 Fix MDX issues

* ✨ add MDX support to Post template

* 🐛 Fix spacing inside profileHeader

* 💡 add useClassNameChangeListen hook

* ⬆️ Dependencies update

* 💄 Fix margins for big screens inside profile header

* 🐛 Fix order of remark-autolink-headers based on info in docs

* ♻️ Refactor Post component -> BlogPost

* ♻️ Refactor some components so that they include styles in the same folder

* 🐛 Fix post image size inside whats on my desk article

* 🐛 Fix build phaswee because of uploads folder

* Update TIL link (#37)

* 🗑️ Update TIL link

* ⬆️ Update dependencies

* ✨ Add Alert component

* 🔥 Reemove prev/next posts functionality

* 🐛 Fix Alert appearance

* ♻️ Refactor MainTools

* Remove Tooltip
* Remove secondary tools
* Remove prettier and sketch from main tools

* ♻️Simplify SocialLinksList

* ♻️Components Refactoring

* Fix lint errors, update dependencies

* Fix lint error

* Remove styled-components

* remove docker

* refactor global.d.ts

* Small refactoring

* Update packages, disable husky hooks

* Add mdx import declarations to TS

* Remove local fonts, improve styling

- Remove local Jetbrains Mono font and use from Google Cloud
- Remove form styles
- Move blockquote styles to typography styles

* 💅 Add prettier printWidth configuration

* 🛠 Improve ESLint config to support newest version

* ♻️ Refactor whole styles folder

- remove components folder. Now components styles are possible only inside react components
- new better variables
- new utilities

* ✨ Add GraphQL config and generate GraphQL Schema

* ✨ Add GraphQL codegen

* 💅 Use styled-components

* ♻️ Refactor Alert

* ✨ Add Avatar component

* ♻️ Refactor footer

* ♻️ Refactor Link component

* Remove MainTools and SocialLinks components

Since index page is described using MDX these components are not needed anymore

* ✨ Add Hero and CodeFileName components

* 🗑 Clean up images folder

* ♻️ Refactor BlogPost component

* ♻️ Refactor Button components

* ♻️ Refactor PostPreview component

* ♻️ Refactor PostAuthor component

* ♻️ Refactor components folder

* Fix MDX accessible emojis parsing

Issue link: florianeckerstorfer/gatsby-remark-a11y-emoji#67

* Use named export

* Fix tertiary color in dark mode

* Simplify 404 page

* Improve footer, add RSS and Github links to footer

* Move footer links to site config

* Small improvements

* Add contact mail

* 🚨 Fix build errors

* Restore husky hooks

Closes #55

* Small changes to Pages markdown

* Remove unused static files

* Improve gatsby-config, remove usage of gatsby-plugin-stylelint

* Remove usage of MDXProvider

* Remove unused packages, improve husky hook configuration

closes #56

* Rename stylelint

* Add folder structure to readme

Closes #54

* Remove gatsby images config (gatsby-source-filesystem)

* Version update

* Add more spacing on index page

* Configure css --color-horizontal-rule variable

* Add separator to PostPreview component

* small code improvements for PostPreview

* Add maskable icons to manifest

* Add label to theme toggle button

* Review and update/format articles

Closes #48

* Fix spacing in blog post

* Add menu button label
@UgRoss
Copy link
Author

UgRoss commented Mar 8, 2021

@florianeckerstorfer thank you!

UgRoss added a commit to UgRoss/ugross.dev that referenced this issue Mar 8, 2021
* ⬆️ Dependencies update

* 🎨 Add default html title

* 🎨 Update footer to use text from siteConfig

* ⚡ Use treeshaking for react-use lib

* ✨ Add MDX support instead of markdown

* 🔥 remove markdownlint

* 🔥 remove deprecated HandheldFriendly meta tag

* ✨ Add MDX support to Post template

* ➖ Remove netlify CMS

* 🐛 Fix MDX issues

* ✨ add MDX support to Post template

* 🐛 Fix spacing inside profileHeader

* 💡 add useClassNameChangeListen hook

* ⬆️ Dependencies update

* 💄 Fix margins for big screens inside profile header

* 🐛 Fix order of remark-autolink-headers based on info in docs

* ♻️ Refactor Post component -> BlogPost

* ♻️ Refactor some components so that they include styles in the same folder

* 🐛 Fix post image size inside whats on my desk article

* 🐛 Fix build phaswee because of uploads folder

* Update TIL link (#37)

* 🗑️ Update TIL link

* ⬆️ Update dependencies

* ✨ Add Alert component

* 🔥 Reemove prev/next posts functionality

* 🐛 Fix Alert appearance

* ♻️ Refactor MainTools

* Remove Tooltip
* Remove secondary tools
* Remove prettier and sketch from main tools

* ♻️Simplify SocialLinksList

* ♻️Components Refactoring

* Fix lint errors, update dependencies

* Fix lint error

* Remove styled-components

* remove docker

* refactor global.d.ts

* Small refactoring

* Update packages, disable husky hooks

* Add mdx import declarations to TS

* Remove local fonts, improve styling

- Remove local Jetbrains Mono font and use from Google Cloud
- Remove form styles
- Move blockquote styles to typography styles

* 💅 Add prettier printWidth configuration

* 🛠 Improve ESLint config to support newest version

* ♻️ Refactor whole styles folder

- remove components folder. Now components styles are possible only inside react components
- new better variables
- new utilities

* ✨ Add GraphQL config and generate GraphQL Schema

* ✨ Add GraphQL codegen

* 💅 Use styled-components

* ♻️ Refactor Alert

* ✨ Add Avatar component

* ♻️ Refactor footer

* ♻️ Refactor Link component

* Remove MainTools and SocialLinks components

Since index page is described using MDX these components are not needed anymore

* ✨ Add Hero and CodeFileName components

* 🗑 Clean up images folder

* ♻️ Refactor BlogPost component

* ♻️ Refactor Button components

* ♻️ Refactor PostPreview component

* ♻️ Refactor PostAuthor component

* ♻️ Refactor components folder

* Fix MDX accessible emojis parsing

Issue link: florianeckerstorfer/gatsby-remark-a11y-emoji#67

* Use named export

* Fix tertiary color in dark mode

* Simplify 404 page

* Improve footer, add RSS and Github links to footer

* Move footer links to site config

* Small improvements

* Add contact mail

* 🚨 Fix build errors

* Restore husky hooks

Closes #55

* Small changes to Pages markdown

* Remove unused static files

* Improve gatsby-config, remove usage of gatsby-plugin-stylelint

* Remove usage of MDXProvider

* Remove unused packages, improve husky hook configuration

closes #56

* Rename stylelint

* Add folder structure to readme

Closes #54

* Remove gatsby images config (gatsby-source-filesystem)

* Version update

* Add more spacing on index page

* Configure css --color-horizontal-rule variable

* Add separator to PostPreview component

* small code improvements for PostPreview

* Add maskable icons to manifest

* Add label to theme toggle button

* Review and update/format articles

Closes #48

* Fix spacing in blog post

* Add menu button label

* Add MDX Headings autolink + Table of Contents support

* Improve generation of flex utilities
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants