Skip to content

Commit

Permalink
fixed: citations appear broken on blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed May 3, 2015
1 parent cff1255 commit 1ee8c36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main-js/miaou.fmt.js
Expand Up @@ -132,7 +132,7 @@ miaou(function(fmt){
}
s = fmt.mdStringToHtml(s, username);
if (m=s.match(/^(?:>\s*)(.*)$/)) {
lout.push('<span class=citation>'+m[1]+'</span>');
lout.push('<span class=citation>'+(m[1]||'&nbsp;')+'</span>');
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion test/format/format-quotes.js
Expand Up @@ -13,7 +13,7 @@ buster.testCase("Formatting - Quotes", {
">\n"+
"> an URL : http://dystroy.org,\n"+
"> and a markdown style link : [dystroy](http://dystroy.org)",
'<span class=citation>A citation over 4 lines with some <b>bold</b> and some <i>italic</i>, a blank line,</span><br><span class=citation></span><br><span class=citation>an URL : <a target=_blank href="http://dystroy.org">http://dystroy.org</a>,</span><br><span class=citation>and a markdown style link : <a target=_blank href="http://dystroy.org">dystroy</a></span>'
'<span class=citation>A citation over 4 lines with some <b>bold</b> and some <i>italic</i>, a blank line,</span><br><span class=citation>&nbsp;</span><br><span class=citation>an URL : <a target=_blank href="http://dystroy.org">http://dystroy.org</a>,</span><br><span class=citation>and a markdown style link : <a target=_blank href="http://dystroy.org">dystroy</a></span>'
),
});

Expand Down

0 comments on commit 1ee8c36

Please sign in to comment.