File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ function notionEmbedsToMDX(input: string): {
9696// In Notion, you can make a callout and change its emoji. We map 5 of these
9797// to the 5 Docusaurus admonition styles.
9898function notionCalloutsToAdmonitions ( input : string ) : string {
99- const notionCalloutPattern = / > \s ( ℹ ️ | ⚠ ️ | 💡 | ❗ | 🔥 ) \s ( .* ) \n / gmu;
99+ const notionCalloutPattern = / > \s ( ℹ ️ | ⚠ ️ | 💡 | ❗ | 🔥 | . ) \s ( .* ) \n / gmu;
100100 const calloutsToAdmonitions = {
101101 /* prettier-ignore */ "ℹ️" : "note" ,
102102 "💡" : "tip" ,
@@ -118,6 +118,12 @@ function notionCalloutsToAdmonitions(input: string): string {
118118 `:::${ docusaurusAdmonition } \n\n${ content } \n\n:::\n\n`
119119 ) ;
120120 }
121+ // For Notion callouts with other emojis, pass them through using hte emoji as the name.
122+ // For this to work on a Docusaurus site, it will need to define that time on the remark-admonitions options in the docusaurus.config.js.
123+ // See https://github.com/elviswolcott/remark-admonitions and https://docusaurus.io/docs/using-plugins#using-presets.
124+ else {
125+ output = output . replace ( string , `:::${ emoji } \n\n${ content } \n\n:::\n\n` ) ;
126+ }
121127 }
122128
123129 return output ;
You can’t perform that action at this time.
0 commit comments