Skip to content

Commit 38742ba

Browse files
committed
Document issue with emoji spacing
Missing spaces is a recongised issue in the remark plugin. This adds there fix, but that doesn't seem to handle some cares so documented a workaround. Using   or unicode characters. fixes #36
1 parent 3ac76cc commit 38742ba

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

example/docs/example1.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ If in a folder you can use relative links so to link from page `example/1.md` to
3131

3232
#### (H4) Emojis
3333

34-
:tada: [emojis](https://www.webfx.com/tools/emoji-cheat-sheet/) are supported using their :shortcodes:
34+
:tada:  [emojis](https://www.webfx.com/tools/emoji-cheat-sheet/) are supported using their :shortcodes:
3535

36-
##### (H5) Images
36+
> NB If you want a space after your emoji you may need to add ` 󠀠󠀠󠀠` or use the unicode space here ->󠀠󠀠󠀠󠀠 . This is a known issue.
3737
38-
Images (PNG and JPEG)
38+
##### (H5) Images
3939

40-
![Example Image](./CommittedSoftware.png "Committed Software")
40+
Images (PNG and JPEG) ![Example Image](./CommittedSoftware.png "Committed Software")
4141

4242
SVG
4343

example/docs/index.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import { navigate } from "gatsby";
1111

1212
The gatsby theme allows you to write documentation in Markdown. With support for:
1313

14-
- :zap: MDX
15-
- :camera: images
16-
- :pencil2: svg
17-
- :tropical_fish: mermaid diagrams
18-
- :package: @committed/components
19-
- :tada: :shortcode: emoji.
20-
- :mag: search
14+
- :zap:  MDX
15+
- :camera:  images
16+
- :pencil2:  svg
17+
- :tropical_fish:  mermaid diagrams
18+
- :package:  @committed/components
19+
- :tada:  :shortcode: emoji.
20+
- :mag:  search
2121

2222
This is meant for Committed's documentation site, but feel free to use it, or copy it, for your own projects.
2323

theme/gatsby-config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,15 @@ module.exports = ({
7777
resolve: `gatsby-plugin-mdx`,
7878
options: {
7979
extensions: [`.mdx`, `.md`],
80-
remarkPlugins: [require('remark-slug'), require('remark-emoji')],
80+
remarkPlugins: [
81+
require('remark-slug'),
82+
[
83+
require('remark-emoji'),
84+
{
85+
padSpaceAfter: true,
86+
},
87+
],
88+
],
8189
gatsbyRemarkPlugins: [
8290
{
8391
resolve: require.resolve(`./plugins/fix-mermaid-pre`),

0 commit comments

Comments
 (0)