Skip to content

Commit

Permalink
markdown: Fix bullet list indentation bug.
Browse files Browse the repository at this point in the history
Previously, the frontend-only javascript processor didn't show the same
output as the backend, resulting in wrong output shown in drafts.

Fixes zulip#10966
  • Loading branch information
AsociTon committed Mar 11, 2019
1 parent 4e504e4 commit e298348
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion static/third/marked/lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ Lexer.prototype.token = function(src, top, bq) {

// list
if (cap = this.rules.list.exec(src)) {
src = src.substring(cap[0].length);

// Reduces the odd number of spaces
// to even.
cap[0] = cap[0].replace(/^(( )*) ?/gm, "$1");
src = src.substring(cap[0].length + 1);
bull = cap[2];

this.tokens.push({
Expand Down

0 comments on commit e298348

Please sign in to comment.