From 5173afde820b572c3741e300e7c310d37ce3b656 Mon Sep 17 00:00:00 2001 From: azivner Date: Sat, 13 Jan 2018 23:24:40 -0500 Subject: [PATCH] changes in formatting of reddit comments --- plugins/reddit.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/reddit.js b/plugins/reddit.js index 79394dbe0..600ccac77 100644 --- a/plugins/reddit.js +++ b/plugins/reddit.js @@ -150,9 +150,13 @@ async function importComments(accountName, afterId = null) { const dateTimeStr = utils.dateStr(new Date(comment.created_utc * 1000)); + const permaLink = 'https://reddit.com' + comment.permalink; + const noteText = - `

${comment.link_permalink}

-

author: ${comment.author}, subreddit: ${comment.subreddit}, karma: ${comment.score}, created at ${dateTimeStr}

` +`

${permaLink}

+

author: ${comment.author}, +subreddit: ${comment.subreddit}, +karma: ${comment.score}, created at ${dateTimeStr}

` + unescape(comment.body_html); let parentNoteId = await getDateNoteIdForReddit(dateTimeStr, rootNoteId);