Skip to content

Commit

Permalink
Fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hisaac committed Dec 31, 2017
1 parent ab96602 commit 03c790f
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions lib/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,23 @@ Renderer.prototype.link = function(href, title, text) {

// Support Basic Description Lists
Renderer.prototype.paragraph = function(text) {
var dlTest = /(^|\s)(\S.+)(<br>\:(\s+))(\S.+)/;
var result = '';
var dlTest = /(^|\s)(\S.+)(<br>:(\s+))(\S.+)/;

var dl =
"<dl>" +
"<dt>$2</dt>" +
"<dd>$5</dd>" +
"</dl>";
var dl
= '<dl>'
+ '<dt>$2</dt>'
+ '<dd>$5</dd>'
+ '</dl>';

if (text.match(dlTest)) {
return text.replace(dlTest, dl);
if (text.match(dlTest)) {
result = text.replace(dlTest, dl);
} else {
return "<p>" + text + "</p>\n";
result = '<p>' + text + '</p>\n';
}
}

return result;
};

marked.setOptions({
langPrefix: '',
Expand Down

0 comments on commit 03c790f

Please sign in to comment.