Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add hard line break when backslash at EOL #1303

Merged
merged 2 commits into from
Jul 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ var inline = {
strong: /^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,
em: /^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,
code: /^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,
br: /^ {2,}\n(?!\s*$)/,
br: /^( {2,}|\\)\n(?!\s*$)/,
del: noop,
text: /^[\s\S]+?(?=[\\<!\[`*]|\b_| {2,}\n|$)/
};
Expand Down
4 changes: 2 additions & 2 deletions test/specs/commonmark/commonmark-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ describe('CommonMark 0.28 Backslash escapes', function() {
var section = 'Backslash escapes';

// var shouldPassButFails = [];
var shouldPassButFails = [290, 291, 293, 300, 301];
var shouldPassButFails = [290, 291, 300, 301];

var willNotBeAttemptedByCoreTeam = [];

Expand Down Expand Up @@ -409,7 +409,7 @@ describe('CommonMark 0.28 Hard line breaks', function() {
var section = 'Hard line breaks';

// var shouldPassButFails = [];
var shouldPassButFails = [611, 606, 609, 613];
var shouldPassButFails = [613];

var willNotBeAttemptedByCoreTeam = [];

Expand Down