From 79c4654cb7201c285411d6c5fa2e4972d3ffaebc Mon Sep 17 00:00:00 2001 From: tom335 Date: Wed, 20 Sep 2023 21:30:13 -0300 Subject: [PATCH] Remove remarkDirective plugin from component According to issue 499 on Github, text patterns starting with a colon ":" were removed from rendered markdown. --- components/text.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/text.js b/components/text.js index 38ddbeb65..750ed578d 100644 --- a/components/text.js +++ b/components/text.js @@ -5,7 +5,7 @@ import { LightAsync as SyntaxHighlighter } from 'react-syntax-highlighter' import atomDark from 'react-syntax-highlighter/dist/cjs/styles/prism/atom-dark' import mention from '../lib/remark-mention' import sub from '../lib/remark-sub' -import remarkDirective from 'remark-directive' +// import remarkDirective from 'remark-directive' import { visit } from 'unist-util-visit' import reactStringReplace from 'react-string-replace' import React, { useRef, useEffect, useState, memo } from 'react' @@ -187,7 +187,8 @@ export default memo(function Text ({ topLevel, noFragments, nofollow, fetchOnlyI return } }} - remarkPlugins={[gfm, mention, sub, remarkDirective, searchHighlighter]} + // plugin remarkDirective removed, see https://github.com/stackernews/stacker.news/issues/499 + remarkPlugins={[gfm, mention, sub, searchHighlighter]} > {children}