From 1420eb34351ad5cf57362380554ed1035f884ba7 Mon Sep 17 00:00:00 2001 From: Tom Theisen Date: Sat, 5 May 2018 08:21:32 -0700 Subject: [PATCH] Strikethrough support for GFM --- lib/marked.js | 2 +- test/specs/gfm/gfm-spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index a88b7d2d..62a64366 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -588,7 +588,7 @@ inline.gfm = merge({}, inline.normal, { .replace('email', inline._email) .getRegex(), _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, - del: /^~~(?=\S)([\s\S]*?\S)~~/, + del: /^~+(?=\S)([\s\S]*?\S)~+/, text: edit(inline.text) .replace(']|', '~]|') .replace('|', '|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&\'*+/=?^_`{\\|}~-]+@|') diff --git a/test/specs/gfm/gfm-spec.js b/test/specs/gfm/gfm-spec.js index a8b43a2e..a4d52f70 100644 --- a/test/specs/gfm/gfm-spec.js +++ b/test/specs/gfm/gfm-spec.js @@ -56,7 +56,7 @@ describe('GFM 0.28 Task list items', function() { describe('GFM 0.28 Strikethrough', function() { var section = 'Strikethrough'; - var shouldPassButFails = [469, 470]; + var shouldPassButFails = []; var willNotBeAttemptedByCoreTeam = [];