From 6b0ccf5bd97ac9ed9ccf4f79470d121d559f3168 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 4 Feb 2015 21:58:02 +0000 Subject: Clarify variable name --- lib/writers/markdown-writer.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/writers/markdown-writer.js b/lib/writers/markdown-writer.js index 5db7cab..eb46175 100644 --- a/lib/writers/markdown-writer.js +++ b/lib/writers/markdown-writer.js @@ -49,8 +49,7 @@ function markdownListItem(attributes, list) { return {start: start, end: "\n"}; } -// map HTML tags to Markdown syntax -var htmlmarkdown = { +var htmlToMarkdown = { // paragraphs elements use three line feeds to close // this prevents them being caught by collapsing list elements in `asString` // while still allowing them to be collapsed when multiple empty lines are removed @@ -67,7 +66,7 @@ var htmlmarkdown = { (function() { for (var i = 1; i <= 6; i++) { - htmlmarkdown["h" + i] = markdownElement(repeatString("#", i) + " ", "\n\n\n"); + htmlToMarkdown["h" + i] = markdownElement(repeatString("#", i) + " ", "\n\n\n"); } })(); @@ -85,7 +84,7 @@ function markdownWriter() { var idHasBeenWritten = false; - var createElement = htmlmarkdown[tagName] || function() { return {}; }; + var createElement = htmlToMarkdown[tagName] || function() { return {}; }; var element = createElement(attributes, list); elementStack.push({end: element.end, list: list}); -- cgit v1.2.3