Linkify better?
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4834 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
ed2d57fb4b
commit
14de3dd9e5
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🐌",
|
||||
"previous": "&h+PXCrnUHtHHfKyUaLW+Y1dP/JpWwG9cbRNjxOCVqw0=.sha256"
|
||||
"previous": "&n2SUkcUV+XP2Idz+bMaU8WrfN7+m63zUoe6nebkHI+M=.sha256"
|
||||
}
|
@ -39,7 +39,7 @@ function splitMatches(text, regexp) {
|
||||
return result;
|
||||
}
|
||||
|
||||
const regex = new RegExp("(?<!\w)#[\\w-]+");
|
||||
const regex = new RegExp("(?<!\\w)#[\\w-]+");
|
||||
|
||||
function split(textNodes) {
|
||||
const text = textNodes.map(n => n.literal).join("");
|
||||
|
@ -50,8 +50,8 @@ export function markdown(md) {
|
||||
let writer = new commonmark.HtmlRenderer();
|
||||
writer.image = image;
|
||||
let parsed = reader.parse(md || '');
|
||||
parsed = linkify.transform(parsed);
|
||||
parsed = hashtagify.transform(parsed);
|
||||
parsed = linkify.transform(parsed);
|
||||
let walker = parsed.walker();
|
||||
let event, node;
|
||||
while ((event = walker.next())) {
|
||||
|
Loading…
Reference in New Issue
Block a user