Merge branch 'renovate/html-react-parser-5.x' into 'main'
Update dependency html-react-parser to v5 See merge request soapbox-pub/soapbox!2879
This commit is contained in:
commit
256f8e8d4c
|
@ -111,7 +111,7 @@
|
||||||
"escape-html": "^1.0.3",
|
"escape-html": "^1.0.3",
|
||||||
"exifr": "^7.1.3",
|
"exifr": "^7.1.3",
|
||||||
"graphemesplit": "^2.4.4",
|
"graphemesplit": "^2.4.4",
|
||||||
"html-react-parser": "^4.2.2",
|
"html-react-parser": "^5.0.0",
|
||||||
"http-link-header": "^1.0.2",
|
"http-link-header": "^1.0.2",
|
||||||
"immer": "^10.0.0",
|
"immer": "^10.0.0",
|
||||||
"immutable": "^4.2.1",
|
"immutable": "^4.2.1",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import parse, { Element, type HTMLReactParserOptions, domToReact } from 'html-react-parser';
|
import parse, { Element, type HTMLReactParserOptions, domToReact, type DOMNode } from 'html-react-parser';
|
||||||
import React, { useState, useRef, useLayoutEffect, useMemo } from 'react';
|
import React, { useState, useRef, useLayoutEffect, useMemo } from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ const StatusContent: React.FC<IStatusContent> = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (classes?.includes('hashtag')) {
|
if (classes?.includes('hashtag')) {
|
||||||
const child = domToReact(domNode.children);
|
const child = domToReact(domNode.children as DOMNode[]);
|
||||||
const hashtag = typeof child === 'string' ? child.replace(/^#/, '') : undefined;
|
const hashtag = typeof child === 'string' ? child.replace(/^#/, '') : undefined;
|
||||||
if (hashtag) {
|
if (hashtag) {
|
||||||
return <HashtagLink hashtag={hashtag} />;
|
return <HashtagLink hashtag={hashtag} />;
|
||||||
|
@ -121,7 +121,7 @@ const StatusContent: React.FC<IStatusContent> = ({
|
||||||
target='_blank'
|
target='_blank'
|
||||||
title={domNode.attribs.href}
|
title={domNode.attribs.href}
|
||||||
>
|
>
|
||||||
{domToReact(domNode.children, options)}
|
{domToReact(domNode.children as DOMNode[], options)}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
58
yarn.lock
58
yarn.lock
|
@ -5214,10 +5214,10 @@ hosted-git-info@^4.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
lru-cache "^6.0.0"
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
html-dom-parser@4.0.0:
|
html-dom-parser@5.0.4:
|
||||||
version "4.0.0"
|
version "5.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/html-dom-parser/-/html-dom-parser-4.0.0.tgz#dc382fbbc9306f8c9b5aae4e3f2822e113a48709"
|
resolved "https://registry.yarnpkg.com/html-dom-parser/-/html-dom-parser-5.0.4.tgz#2941a762317d088e747db31c8cf290987ec30a55"
|
||||||
integrity sha512-TUa3wIwi80f5NF8CVWzkopBVqVAtlawUzJoLwVLHns0XSJGynss4jiY0mTWpiDOsuyw+afP+ujjMgRh9CoZcXw==
|
integrity sha512-azy8THLKd4Ar0OVJpEgX+MSjYvKdNDWlGiRBIlovMqEQYMAnLLXBhhiSwjylDD3RDdcCYT8Utg6uoRDeLHUyHg==
|
||||||
dependencies:
|
dependencies:
|
||||||
domhandler "5.0.3"
|
domhandler "5.0.3"
|
||||||
htmlparser2 "9.0.0"
|
htmlparser2 "9.0.0"
|
||||||
|
@ -5242,15 +5242,15 @@ html-minifier-terser@^6.1.0:
|
||||||
relateurl "^0.2.7"
|
relateurl "^0.2.7"
|
||||||
terser "^5.10.0"
|
terser "^5.10.0"
|
||||||
|
|
||||||
html-react-parser@^4.2.2:
|
html-react-parser@^5.0.0:
|
||||||
version "4.2.2"
|
version "5.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/html-react-parser/-/html-react-parser-4.2.2.tgz#91f1cc2138bc069d65cbd8b9d97b1e71ed423300"
|
resolved "https://registry.yarnpkg.com/html-react-parser/-/html-react-parser-5.0.7.tgz#3ada0420c0ae05dce2915fff78aad2b9d678041f"
|
||||||
integrity sha512-lh0wEGISnFZEAmvQqK4xc0duFMUh/m9YYyAhFursWxdtNv+hCZge0kj1y4wep6qPB5Zm33L+2/P6TcGWAJJbjA==
|
integrity sha512-00ve/0B7ukLUAcAbmD6Vh74EicB+ktLvAM4APeXJjiBsRiPz2ouochTvyUhOJB8apP2t40xAXvpmd+t50aVnJg==
|
||||||
dependencies:
|
dependencies:
|
||||||
domhandler "5.0.3"
|
domhandler "5.0.3"
|
||||||
html-dom-parser "4.0.0"
|
html-dom-parser "5.0.4"
|
||||||
react-property "2.0.0"
|
react-property "2.0.2"
|
||||||
style-to-js "1.1.4"
|
style-to-js "1.1.10"
|
||||||
|
|
||||||
html-tags@^3.3.1:
|
html-tags@^3.3.1:
|
||||||
version "3.3.1"
|
version "3.3.1"
|
||||||
|
@ -5404,10 +5404,10 @@ ini@^1.3.5:
|
||||||
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
|
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
|
||||||
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
|
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
|
||||||
|
|
||||||
inline-style-parser@0.1.1:
|
inline-style-parser@0.2.2:
|
||||||
version "0.1.1"
|
version "0.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1"
|
resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.2.2.tgz#d498b4e6de0373458fc610ff793f6b14ebf45633"
|
||||||
integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==
|
integrity sha512-EcKzdTHVe8wFVOGEYXiW9WmJXPjqi1T+234YpJr98RiFYKHV3cdy1+3mkTE+KHTHxFFLH51SfaGOoUdW+v7ViQ==
|
||||||
|
|
||||||
internal-slot@^1.0.5:
|
internal-slot@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
|
@ -7532,10 +7532,10 @@ react-popper@^2.2.5, react-popper@^2.3.0:
|
||||||
react-fast-compare "^3.0.1"
|
react-fast-compare "^3.0.1"
|
||||||
warning "^4.0.2"
|
warning "^4.0.2"
|
||||||
|
|
||||||
react-property@2.0.0:
|
react-property@2.0.2:
|
||||||
version "2.0.0"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/react-property/-/react-property-2.0.0.tgz#2156ba9d85fa4741faf1918b38efc1eae3c6a136"
|
resolved "https://registry.yarnpkg.com/react-property/-/react-property-2.0.2.tgz#d5ac9e244cef564880a610bc8d868bd6f60fdda6"
|
||||||
integrity sha512-kzmNjIgU32mO4mmH5+iUyrqlpFQhF8K2k7eZ4fdLSOPFrD1XgEuSBv9LDEgxRXTMBqMd8ppT0x6TIzqE5pdGdw==
|
integrity sha512-+PbtI3VuDV0l6CleQMsx2gtK0JZbZKbpdu5ynr+lbsuvtmgbNcS3VM0tuY2QjFNOcWxvXeHjDpy42RO+4U2rug==
|
||||||
|
|
||||||
react-redux@^9.0.4:
|
react-redux@^9.0.4:
|
||||||
version "9.0.4"
|
version "9.0.4"
|
||||||
|
@ -8389,19 +8389,19 @@ style-search@^0.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"
|
resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"
|
||||||
integrity sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=
|
integrity sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=
|
||||||
|
|
||||||
style-to-js@1.1.4:
|
style-to-js@1.1.10:
|
||||||
version "1.1.4"
|
version "1.1.10"
|
||||||
resolved "https://registry.yarnpkg.com/style-to-js/-/style-to-js-1.1.4.tgz#5fa07a181ec3ca354d699edf442549e0ac61ed32"
|
resolved "https://registry.yarnpkg.com/style-to-js/-/style-to-js-1.1.10.tgz#ec20e1264ba11dc7f71b94b3a3a05566ed856e54"
|
||||||
integrity sha512-zEeU3vy9xL/hdLBFmzqjhm+2vJ1Y35V0ctDeB2sddsvN1856OdMZUCOOfKUn3nOjjEKr6uLhOnY4CrX6gLDRrA==
|
integrity sha512-VC7MBJa+y0RZhpnLKDPmVRLRswsASLmixkiZ5R8xZpNT9VyjeRzwnXd2pBzAWdgSGv/pCNNH01gPCCUsB9exYg==
|
||||||
dependencies:
|
dependencies:
|
||||||
style-to-object "0.4.2"
|
style-to-object "1.0.5"
|
||||||
|
|
||||||
style-to-object@0.4.2:
|
style-to-object@1.0.5:
|
||||||
version "0.4.2"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.4.2.tgz#a8247057111dea8bd3b8a1a66d2d0c9cf9218a54"
|
resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-1.0.5.tgz#5e918349bc3a39eee3a804497d97fcbbf2f0d7c0"
|
||||||
integrity sha512-1JGpfPB3lo42ZX8cuPrheZbfQ6kqPPnPHlKMyeRYtfKD+0jG+QsXgXN57O/dvJlzlB2elI6dGmrPnl5VPQFPaA==
|
integrity sha512-rDRwHtoDD3UMMrmZ6BzOW0naTjMsVZLIjsGleSKS/0Oz+cgCfAPRspaqJuE8rDzpKha/nEvnM0IF4seEAZUTKQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
inline-style-parser "0.1.1"
|
inline-style-parser "0.2.2"
|
||||||
|
|
||||||
stylehacks@^6.0.0:
|
stylehacks@^6.0.0:
|
||||||
version "6.0.0"
|
version "6.0.0"
|
||||||
|
|
Loading…
Reference in New Issue