Estevão Soares dos Santos преди 10 години
родител
ревизия
7c7f49e8de
променени са 4 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 2 1
      src/showdown.js
  2. 1 0
      test/issues/#150.hyphens are getting removed.html
  3. 1 0
      test/issues/#150.hyphens are getting removed.md
  4. 1 0
      test/run.js

+ 2 - 1
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.";
             }
         });
     }

+ 1 - 0
test/issues/#150.hyphens are getting removed.html

@@ -0,0 +1 @@
+<p>2015-10-04</p>

+ 1 - 0
test/issues/#150.hyphens are getting removed.md

@@ -0,0 +1 @@
+2015-10-04

+ 1 - 0
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);
 });