From d75e56a8d8e6f057370f4db2579d23b265551ee4 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Mon, 16 Mar 2015 19:23:34 +0000 Subject: [PATCH 1/3] Fix extension name in error always 'undefined' --- src/showdown.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/showdown.js b/src/showdown.js index 25bed63..0505fb0 100644 --- a/src/showdown.js +++ b/src/showdown.js @@ -222,6 +222,7 @@ Showdown.converter = function (converter_options) { // Iterate over each plugin Showdown.forEach(converter_options.extensions, function (plugin) { + var pluginName = plugin; // Assume it's a bundled plugin if a string is given if (typeof plugin === 'string') { @@ -244,7 +245,7 @@ Showdown.converter = function (converter_options) { } }); } else { - throw "Extension '" + plugin + "' could not be loaded. It was either not found or is not a valid extension."; + throw "Extension '" + pluginName + "' could not be loaded. It was either not found or is not a valid extension."; } }); } From f8c4c983ea81ad102374ae2eb7514f9930a4c816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Estev=C3=A3o=20Soares=20dos=20Santos?= Date: Mon, 27 Apr 2015 17:50:48 +0100 Subject: [PATCH 2/3] chore(run.js): add issue testing --- test/run.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/run.js b/test/run.js index e6f59c0..66d87d9 100644 --- a/test/run.js +++ b/test/run.js @@ -54,6 +54,7 @@ var runTestsInDir = function(dir, converter) { describe('Markdown', function() { var converter = new showdown.converter(); runTestsInDir('test/cases', converter); + runTestsInDir('test/issues', converter); }); From b80bdce8cfe541f51a11ce860d381f0358e1bd6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Estev=C3=A3o=20Soares=20dos=20Santos?= Date: Mon, 27 Apr 2015 17:51:32 +0100 Subject: [PATCH 3/3] chore(): add test for issue #150 --- test/issues/#150.hyphens are getting removed.html | 1 + test/issues/#150.hyphens are getting removed.md | 1 + 2 files changed, 2 insertions(+) create mode 100644 test/issues/#150.hyphens are getting removed.html create mode 100644 test/issues/#150.hyphens are getting removed.md diff --git a/test/issues/#150.hyphens are getting removed.html b/test/issues/#150.hyphens are getting removed.html new file mode 100644 index 0000000..8f9d2e5 --- /dev/null +++ b/test/issues/#150.hyphens are getting removed.html @@ -0,0 +1 @@ +

2015-10-04

\ No newline at end of file diff --git a/test/issues/#150.hyphens are getting removed.md b/test/issues/#150.hyphens are getting removed.md new file mode 100644 index 0000000..d0d6dda --- /dev/null +++ b/test/issues/#150.hyphens are getting removed.md @@ -0,0 +1 @@ +2015-10-04