Skip to content

Commit 24a3f88

Browse files
chore: export gemoji regex (#1192)
| [![PR App][icn]][demo] | Ref RM-13850 | | :--------------------: | :----------: | ## 🧰 Changes Export the gemoji regex so we can use it in the markdown editor. ## 🧬 QA & Testing - [Broken on production][prod]. - [Working in this PR app][demo]. [demo]: https://markdown-pr-PR_NUMBER.herokuapp.com [prod]: https://SUBDOMAIN.readme.io [icn]: https://user-images.githubusercontent.com/886627/160426047-1bee9488-305a-4145-bb2b-09d8b757d38a.svg
1 parent 0f21ce8 commit 24a3f88

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ export { compile, exports, hast, run, mdast, mdastV6, mdx, migrate, plain, remar
1616
export { default as Owlmoji } from './lib/owlmoji';
1717
export { Components, utils };
1818
export { tailwindCompiler } from './utils/tailwind-compiler';
19+
export { regex as gemojiRegex } from './processor/transform/gemoji+';

processor/transform/gemoji+.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { findAndReplace } from 'mdast-util-find-and-replace';
66
import { NodeTypes } from '../../enums';
77
import Owlmoji from '../../lib/owlmoji';
88

9-
const regex = /(?<=^|\s):(?<name>\+1|[-\w]+):/g;
9+
export const regex = /(?<=^|\s):(?<name>\+1|[-\w]+):/g;
1010

1111
const gemojiReplacer = (_, name: string) => {
1212
switch (Owlmoji.kind(name)) {

0 commit comments

Comments
 (0)