diff options
| author | Henry Jameson <me@hjkos.com> | 2022-03-22 16:40:45 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-03-22 18:22:23 +0200 |
| commit | c2cf13fc006aa1e513feb99799a8d2df14119eca (patch) | |
| tree | 56aa90883d984957959f63f7e53be1ed7c5ace93 /src/components/rich_content | |
| parent | c3546ea8567fc29a795e11d1e5303ea46ed596e0 (diff) | |
fix richcontent and its tests
Diffstat (limited to 'src/components/rich_content')
| -rw-r--r-- | src/components/rich_content/rich_content.jsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index 97c51189..41e287e4 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -1,4 +1,3 @@ -import { h } from 'vue' import { unescape, flattenDeep } from 'lodash' import { getTagName, processTextForEmoji, getAttrs } from 'src/services/html_converter/utility.service.js' import { convertHtmlToTree } from 'src/services/html_converter/html_tree_converter.service.js' @@ -82,12 +81,12 @@ export default { } const renderHashtag = (attrs, children, encounteredTextReverse) => { - const linkData = getLinkData(attrs, children, tagsIndex++) + const { index, ...linkData } = getLinkData(attrs, children, tagsIndex++) writtenTags.push(linkData) if (!encounteredTextReverse) { lastTags.push(linkData) } - return <HashtagLink {...{ props: linkData }}/> + return <HashtagLink { ...linkData }/> } const renderMention = (attrs, children) => { @@ -235,7 +234,7 @@ export default { const newChildren = Array.isArray(children) ? [...children].reverse().map(processItemReverse).reverse() : children - return <Tag {...{ attrs: getAttrs(opener) }}> + return <Tag {...getAttrs(opener)}> { newChildren } </Tag> } else { |
