Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web,mobile): match GitHub strikethrough parsing #9021

Closedahalekelly(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/9021/headopened View on GitHub

Showing 4 changed files with 50 additions and 6 deletions.

x
0 of 4 viewed, 4 left
8 additions and 6 deletionsapps/web/src/components/ChatMarkdown.tsxModified
View file
@@ -492,18 +492,20 @@
} satisfies Parameters<typeof rehypeSanitize>[0];
​
-const CHAT_MARKDOWN_REMARK_PLUGINS = [
- remarkGfm,
+export const CHAT_MARKDOWN_REMARK_PLUGINS: NonNullable<ReactMarkdownOptions["remarkPlugins"]> = [
+ [remarkGfm, { singleTilde: false }],
remarkKeepWindowsPathDestinations,
remarkGithubAlerts,
remarkNormalizeListItemIndentation,
remarkCodexDirectives,
remarkPreserveCodeMeta,
remarkNormalizeLinksAndTagInlineCode,
-] satisfies NonNullable<ReactMarkdownOptions["remarkPlugins"]>;
+];
​
-const CHAT_MARKDOWN_REMARK_PLUGINS_WITH_BREAKS = [
- remarkGfm,
+export const CHAT_MARKDOWN_REMARK_PLUGINS_WITH_BREAKS: NonNullable<
+ ReactMarkdownOptions["remarkPlugins"]
+> = [
+ [remarkGfm, { singleTilde: false }],
remarkKeepWindowsPathDestinations,
remarkGithubAlerts,
remarkNormalizeListItemIndentation,
@@ -511,7 +513,7 @@
remarkBreaks,
remarkPreserveCodeMeta,