mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-23 07:30:57 -05:00
Compare commits
3 commits
8b4e20f971
...
1bedf4dc70
Author | SHA1 | Date | |
---|---|---|---|
|
1bedf4dc70 | ||
|
478d375125 | ||
|
28c897ac3d |
2 changed files with 13 additions and 6 deletions
|
@ -185,7 +185,8 @@ 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 = /(^(?:[>*+-][^\S\r\n]*){5})(?:[>*+-][^\S\r\n]*)+(.*$)/gm;
|
const RE_RECURSIVE =
|
||||||
|
/(^(?:(?:[>*+-]|\d+\.)[^\S\r\n]*){5})(?:(?:[>*+-]|\d+\.)[^\S\r\n]*)+(.*$)/gm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regex for matching multi-line blockquotes
|
* Regex for matching multi-line blockquotes
|
||||||
|
@ -247,9 +248,13 @@ export default memo(({ content, disallowBigEmoji }: MarkdownProps) => {
|
||||||
const [Content, setContent] = useState<React.ReactElement>(null!);
|
const [Content, setContent] = useState<React.ReactElement>(null!);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
render
|
try {
|
||||||
.process(sanitisedContent)
|
render
|
||||||
.then((file) => setContent(file.result));
|
.process(sanitisedContent)
|
||||||
|
.then((file) => setContent(file.result));
|
||||||
|
} catch (err) {
|
||||||
|
setContent("Message failed to render." as never);
|
||||||
|
}
|
||||||
}, [sanitisedContent]);
|
}, [sanitisedContent]);
|
||||||
|
|
||||||
const largeEmoji = useMemo(
|
const largeEmoji = useMemo(
|
||||||
|
|
|
@ -369,7 +369,9 @@ function ListElement({
|
||||||
<KanbanList last={false} key={category.id}>
|
<KanbanList last={false} key={category.id}>
|
||||||
<div className="inner">
|
<div className="inner">
|
||||||
<Row>
|
<Row>
|
||||||
<KanbanListHeader {...provided.dragHandleProps}>
|
<KanbanListHeader
|
||||||
|
{...provided.dragHandleProps}
|
||||||
|
onClick={startEditing}>
|
||||||
{editing !== undefined ? (
|
{editing !== undefined ? (
|
||||||
<input
|
<input
|
||||||
value={editing}
|
value={editing}
|
||||||
|
@ -384,7 +386,7 @@ function ListElement({
|
||||||
id={category.id}
|
id={category.id}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<span onClick={startEditing}>
|
<span>
|
||||||
{category.title}
|
{category.title}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue