chore: typo (#783)

pull/786/head
artiely 2 years ago committed by GitHub
parent 919d23079b
commit 521601d20b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -32,7 +32,7 @@ const removeMarkdownTokens = (str: string) =>
.replace(/(`|\*{1,3}|_)(.*?[^\\])\1/g, '$2') // `{t}` | *{t}* | **{t}** | ***{t}*** | _{t}_ .replace(/(`|\*{1,3}|_)(.*?[^\\])\1/g, '$2') // `{t}` | *{t}* | **{t}** | ***{t}*** | _{t}_
.replace(/(\\)(\*|_|`|\!|<|\$)/g, '$2') // remove escape char '\' .replace(/(\\)(\*|_|`|\!|<|\$)/g, '$2') // remove escape char '\'
const remvoeCustomAnchor = (str: string) => const removeCustomAnchor = (str: string) =>
str.replace(/\{#([a-z0-9\-_]+?)\}\s*$/, '') // {#custom-header} str.replace(/\{#([a-z0-9\-_]+?)\}\s*$/, '') // {#custom-header}
const trim = (str: string) => str.trim() const trim = (str: string) => str.trim()
@ -57,7 +57,7 @@ const compose = (...processors: ((str: string) => string)[]) => {
export const parseHeader = compose( export const parseHeader = compose(
unescapeHtml, unescapeHtml,
parseEmojis, parseEmojis,
remvoeCustomAnchor, removeCustomAnchor,
removeMarkdownTokens, removeMarkdownTokens,
trim trim
) )

Loading…
Cancel
Save