allow the closing fence to be longer that the opening one (pass cm example 93)

This commit is contained in:
Federico Soave 2018-12-08 13:01:36 +01:00
parent 67a5941f4d
commit d0aa0b1a08
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ block.normal = merge({}, block);
*/
block.gfm = merge({}, block.normal, {
fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n(?:|([\s\S]*?)\n) *\1 *(?:\n+|$)/,
fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n(?:|([\s\S]*?)\n) *\1[~`]* *(?:\n+|$)/,
paragraph: /^/,
heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/
});

View File

@ -160,7 +160,7 @@ describe('CommonMark 0.28 Fenced code blocks', function() {
var section = 'Fenced code blocks';
// var shouldPassButFails = [];
var shouldPassButFails = [93, 95, 96, 97, 106, 108, 112];
var shouldPassButFails = [95, 96, 97, 106, 108, 112];
var willNotBeAttemptedByCoreTeam = [];