Skip to content

Commit

Permalink
fix handling of hard line breaks
Browse files Browse the repository at this point in the history
Closes: bevacqua/woofmark#76
Signed-off-by: Kai Krakow <[email protected]>
  • Loading branch information
kakra committed Feb 18, 2021
1 parent c90398b commit 0d03bdf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ md.core.ruler.after('linkify', 'pos_counter', function posCounter (state) {
if (token.markup) {
moveCursor(token.markup);
}
if (token.type === 'hardbreak') {
moveCursor(' \n');
}
if (token.type === 'link_open') {
moveCursor('[');
}
Expand Down

0 comments on commit 0d03bdf

Please sign in to comment.