mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-23 15:40:57 -05:00
Compare commits
1 commit
fb7aa08b70
...
35ca83c38f
Author | SHA1 | Date | |
---|---|---|---|
|
35ca83c38f |
1 changed files with 4 additions and 9 deletions
|
@ -185,8 +185,7 @@ const Container = styled.div<{ largeEmoji: boolean }>`
|
||||||
/**
|
/**
|
||||||
* Regex for matching execessive recursion of blockquotes and lists
|
* Regex for matching execessive recursion of blockquotes and lists
|
||||||
*/
|
*/
|
||||||
const RE_RECURSIVE =
|
const RE_RECURSIVE = /(^(?:[>*+-][^\S\r\n]*){5})(?:[>*+-][^\S\r\n]*)+(.*$)/gm;
|
||||||
/(^(?:(?:[>*+-]|\d+\.)[^\S\r\n]*){5})(?:(?:[>*+-]|\d+\.)[^\S\r\n]*)+(.*$)/gm;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regex for matching multi-line blockquotes
|
* Regex for matching multi-line blockquotes
|
||||||
|
@ -248,13 +247,9 @@ export default memo(({ content, disallowBigEmoji }: MarkdownProps) => {
|
||||||
const [Content, setContent] = useState<React.ReactElement>(null!);
|
const [Content, setContent] = useState<React.ReactElement>(null!);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
try {
|
|
||||||
render
|
render
|
||||||
.process(sanitisedContent)
|
.process(sanitisedContent)
|
||||||
.then((file) => setContent(file.result));
|
.then((file) => setContent(file.result));
|
||||||
} catch (err) {
|
|
||||||
setContent("Message failed to render." as never);
|
|
||||||
}
|
|
||||||
}, [sanitisedContent]);
|
}, [sanitisedContent]);
|
||||||
|
|
||||||
const largeEmoji = useMemo(
|
const largeEmoji = useMemo(
|
||||||
|
|
Loading…
Reference in a new issue