forked from cory/tildefriends
Link conversations, too.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3791 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
function markdown(md) {
|
||||
var reader = new commonmark.Parser({safe: true});
|
||||
var writer = new commonmark.HtmlRenderer();
|
||||
var parsed = reader.parse(md);
|
||||
var parsed = reader.parse(md || '');
|
||||
var walker = parsed.walker();
|
||||
var event, node;
|
||||
while ((event = walker.next())) {
|
||||
@ -12,6 +12,9 @@ function markdown(md) {
|
||||
if (node.destination.startsWith('@') &&
|
||||
node.destination.endsWith('.ed25519')) {
|
||||
node.destination = '#' + node.destination;
|
||||
} else if (node.destination.startsWith('%') &&
|
||||
node.destination.endsWith('.sha256')) {
|
||||
node.destination = '#' + node.destination;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user