diff --git a/Gruntfile.js b/Gruntfile.js index 68d96a6..777c75d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -24,7 +24,7 @@ module.exports = function (grunt) { 'src/showdown.js', 'src/helpers.js', 'src/converter.js', - 'src/subParsers/*.js', + 'src/subParsers/makehtml/*.js', 'src/loader.js' ], dest: 'dist/<%= pkg.name %>.js' diff --git a/dist/showdown.js b/dist/showdown.js index de01662..972d404 100644 Binary files a/dist/showdown.js and b/dist/showdown.js differ diff --git a/dist/showdown.js.map b/dist/showdown.js.map index efc6a68..05286d5 100644 Binary files a/dist/showdown.js.map and b/dist/showdown.js.map differ diff --git a/dist/showdown.min.js b/dist/showdown.min.js index 4feb69c..aaaefa6 100644 Binary files a/dist/showdown.min.js and b/dist/showdown.min.js differ diff --git a/dist/showdown.min.js.map b/dist/showdown.min.js.map index baf1bc5..fc2e681 100644 Binary files a/dist/showdown.min.js.map and b/dist/showdown.min.js.map differ diff --git a/src/showdown.js b/src/showdown.js index 18b8268..95fdc4e 100644 --- a/src/showdown.js +++ b/src/showdown.js @@ -4,6 +4,7 @@ // load dependencies if (typeof document === 'undefined' && typeof window === 'undefined') { + // JSDOM - acts as polyfill for window and document objects var jsdom = require('jsdom').jsdom, jsdomObj = jsdom('', {}), window = jsdomObj.defaultView, // jshint ignore:line diff --git a/src/subParsers/anchors.js b/src/subParsers/makehtml/anchors.js similarity index 100% rename from src/subParsers/anchors.js rename to src/subParsers/makehtml/anchors.js diff --git a/src/subParsers/autoLinks.js b/src/subParsers/makehtml/autoLinks.js similarity index 100% rename from src/subParsers/autoLinks.js rename to src/subParsers/makehtml/autoLinks.js diff --git a/src/subParsers/blockGamut.js b/src/subParsers/makehtml/blockGamut.js similarity index 100% rename from src/subParsers/blockGamut.js rename to src/subParsers/makehtml/blockGamut.js diff --git a/src/subParsers/blockQuotes.js b/src/subParsers/makehtml/blockQuotes.js similarity index 100% rename from src/subParsers/blockQuotes.js rename to src/subParsers/makehtml/blockQuotes.js diff --git a/src/subParsers/codeBlocks.js b/src/subParsers/makehtml/codeBlocks.js similarity index 100% rename from src/subParsers/codeBlocks.js rename to src/subParsers/makehtml/codeBlocks.js diff --git a/src/subParsers/codeSpans.js b/src/subParsers/makehtml/codeSpans.js similarity index 100% rename from src/subParsers/codeSpans.js rename to src/subParsers/makehtml/codeSpans.js diff --git a/src/subParsers/detab.js b/src/subParsers/makehtml/detab.js similarity index 100% rename from src/subParsers/detab.js rename to src/subParsers/makehtml/detab.js diff --git a/src/subParsers/ellipsis.js b/src/subParsers/makehtml/ellipsis.js similarity index 100% rename from src/subParsers/ellipsis.js rename to src/subParsers/makehtml/ellipsis.js diff --git a/src/subParsers/emoji.js b/src/subParsers/makehtml/emoji.js similarity index 100% rename from src/subParsers/emoji.js rename to src/subParsers/makehtml/emoji.js diff --git a/src/subParsers/encodeAmpsAndAngles.js b/src/subParsers/makehtml/encodeAmpsAndAngles.js similarity index 100% rename from src/subParsers/encodeAmpsAndAngles.js rename to src/subParsers/makehtml/encodeAmpsAndAngles.js diff --git a/src/subParsers/encodeBackslashEscapes.js b/src/subParsers/makehtml/encodeBackslashEscapes.js similarity index 100% rename from src/subParsers/encodeBackslashEscapes.js rename to src/subParsers/makehtml/encodeBackslashEscapes.js diff --git a/src/subParsers/encodeCode.js b/src/subParsers/makehtml/encodeCode.js similarity index 100% rename from src/subParsers/encodeCode.js rename to src/subParsers/makehtml/encodeCode.js diff --git a/src/subParsers/escapeSpecialCharsWithinTagAttributes.js b/src/subParsers/makehtml/escapeSpecialCharsWithinTagAttributes.js similarity index 100% rename from src/subParsers/escapeSpecialCharsWithinTagAttributes.js rename to src/subParsers/makehtml/escapeSpecialCharsWithinTagAttributes.js diff --git a/src/subParsers/githubCodeBlocks.js b/src/subParsers/makehtml/githubCodeBlocks.js similarity index 100% rename from src/subParsers/githubCodeBlocks.js rename to src/subParsers/makehtml/githubCodeBlocks.js diff --git a/src/subParsers/hashBlock.js b/src/subParsers/makehtml/hashBlock.js similarity index 100% rename from src/subParsers/hashBlock.js rename to src/subParsers/makehtml/hashBlock.js diff --git a/src/subParsers/hashCodeTags.js b/src/subParsers/makehtml/hashCodeTags.js similarity index 100% rename from src/subParsers/hashCodeTags.js rename to src/subParsers/makehtml/hashCodeTags.js diff --git a/src/subParsers/hashElement.js b/src/subParsers/makehtml/hashElement.js similarity index 100% rename from src/subParsers/hashElement.js rename to src/subParsers/makehtml/hashElement.js diff --git a/src/subParsers/hashHTMLBlocks.js b/src/subParsers/makehtml/hashHTMLBlocks.js similarity index 100% rename from src/subParsers/hashHTMLBlocks.js rename to src/subParsers/makehtml/hashHTMLBlocks.js diff --git a/src/subParsers/hashHTMLSpans.js b/src/subParsers/makehtml/hashHTMLSpans.js similarity index 100% rename from src/subParsers/hashHTMLSpans.js rename to src/subParsers/makehtml/hashHTMLSpans.js diff --git a/src/subParsers/hashPreCodeTags.js b/src/subParsers/makehtml/hashPreCodeTags.js similarity index 100% rename from src/subParsers/hashPreCodeTags.js rename to src/subParsers/makehtml/hashPreCodeTags.js diff --git a/src/subParsers/headers.js b/src/subParsers/makehtml/headers.js similarity index 100% rename from src/subParsers/headers.js rename to src/subParsers/makehtml/headers.js diff --git a/src/subParsers/horizontalRule.js b/src/subParsers/makehtml/horizontalRule.js similarity index 100% rename from src/subParsers/horizontalRule.js rename to src/subParsers/makehtml/horizontalRule.js diff --git a/src/subParsers/images.js b/src/subParsers/makehtml/images.js similarity index 100% rename from src/subParsers/images.js rename to src/subParsers/makehtml/images.js diff --git a/src/subParsers/italicsAndBold.js b/src/subParsers/makehtml/italicsAndBold.js similarity index 100% rename from src/subParsers/italicsAndBold.js rename to src/subParsers/makehtml/italicsAndBold.js diff --git a/src/subParsers/lists.js b/src/subParsers/makehtml/lists.js similarity index 100% rename from src/subParsers/lists.js rename to src/subParsers/makehtml/lists.js diff --git a/src/subParsers/outdent.js b/src/subParsers/makehtml/outdent.js similarity index 100% rename from src/subParsers/outdent.js rename to src/subParsers/makehtml/outdent.js diff --git a/src/subParsers/paragraphs.js b/src/subParsers/makehtml/paragraphs.js similarity index 100% rename from src/subParsers/paragraphs.js rename to src/subParsers/makehtml/paragraphs.js diff --git a/src/subParsers/runExtension.js b/src/subParsers/makehtml/runExtension.js similarity index 100% rename from src/subParsers/runExtension.js rename to src/subParsers/makehtml/runExtension.js diff --git a/src/subParsers/spanGamut.js b/src/subParsers/makehtml/spanGamut.js similarity index 100% rename from src/subParsers/spanGamut.js rename to src/subParsers/makehtml/spanGamut.js diff --git a/src/subParsers/strikethrough.js b/src/subParsers/makehtml/strikethrough.js similarity index 100% rename from src/subParsers/strikethrough.js rename to src/subParsers/makehtml/strikethrough.js diff --git a/src/subParsers/stripLinkDefinitions.js b/src/subParsers/makehtml/stripLinkDefinitions.js similarity index 100% rename from src/subParsers/stripLinkDefinitions.js rename to src/subParsers/makehtml/stripLinkDefinitions.js diff --git a/src/subParsers/tables.js b/src/subParsers/makehtml/tables.js similarity index 100% rename from src/subParsers/tables.js rename to src/subParsers/makehtml/tables.js diff --git a/src/subParsers/underline.js b/src/subParsers/makehtml/underline.js similarity index 100% rename from src/subParsers/underline.js rename to src/subParsers/makehtml/underline.js diff --git a/src/subParsers/unescapeSpecialChars.js b/src/subParsers/makehtml/unescapeSpecialChars.js similarity index 100% rename from src/subParsers/unescapeSpecialChars.js rename to src/subParsers/makehtml/unescapeSpecialChars.js