Skip to content

Commit

Permalink
Merge pull request #3862 from nextcloud/fix/noid/autolink-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
raimund-schluessler authored Mar 5, 2023
2 parents d9b0d85 + a846a44 commit c1dd3a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/NcRichText/autolink.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const remarkAutolink = function({ autolink, useMarkdown }) {
}

visit(tree, (node) => node.type === 'text', (node, index, parent) => {
let parsed = parseUrl(node.value, Link)
let parsed = parseUrl(node.value)
parsed = parsed.map((n) => {
if (typeof n === 'string') {
return u('text', n)
Expand All @@ -49,7 +49,7 @@ export const remarkAutolink = function({ autolink, useMarkdown }) {
}
}

export const parseUrl = (text, linkComponent) => {
export const parseUrl = (text) => {
let match = URL_PATTERN_AUTOLINK.exec(text)
const list = []
let start = 0
Expand Down

0 comments on commit c1dd3a1

Please sign in to comment.