Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
f53680a0
Commit
f53680a0
authored
Mar 08, 2021
by
Stefan Probst
Browse files
fix: strip github markdown syntax from search results preview
parent
6a940195
Pipeline
#178731
failed with stages
in 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/modules/markdown/Plaintext.tsx
View file @
f53680a0
import
excerpt
from
'
@stefanprobst/remark-excerpt
'
import
{
Fragment
,
useMemo
}
from
'
react
'
import
markdown
from
'
remark-parse
'
import
gfm
from
'
remark-gfm
'
import
toMarkdown
from
'
remark-stringify
'
import
strip
from
'
strip-markdown
'
import
unified
from
'
unified
'
...
...
@@ -10,7 +11,7 @@ import unified from 'unified'
* to match what is used for static content pages, but currently
* this does not have a treeshakeable export.
*/
const
markdownProcessor
=
unified
().
use
(
markdown
).
use
(
toMarkdown
)
const
markdownProcessor
=
unified
().
use
(
markdown
).
use
(
gfm
).
use
(
toMarkdown
)
/**
* removes markdown formatting from text.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment