From b3cc8c0c5ce2aa2e556e995d587da5a00c6a3185 Mon Sep 17 00:00:00 2001 From: Craig Leinoff Date: Tue, 7 Jan 2014 11:50:49 -0500 Subject: Renaming heuristics-processor to style-applicator --- lib/heuristics-processor.js | 26 -------------------------- lib/style-applicator.js | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-) delete mode 100644 lib/heuristics-processor.js create mode 100644 lib/style-applicator.js (limited to 'lib') diff --git a/lib/heuristics-processor.js b/lib/heuristics-processor.js deleted file mode 100644 index 0e3c97d..0000000 --- a/lib/heuristics-processor.js +++ /dev/null @@ -1,26 +0,0 @@ -exports.HeuristicsProcessor = HeuristicsProcessor; - -function HeuristicsProcessor() { - function processHeuristics(document) { - for (var i = 0; i < document.value.children.length; i++) { - var element = document.value.children[i]; - switch (element.type) { - case 'paragraph': - document.value.children[i] = processParagraph(document.value.children[i]); - break; - } - } - return document; - } - - function processParagraph(element) { - if (element.alignment == 'center' && !element.styleName) { - element.styleName = "CenteredHeading"; - } - return element; - } - - return { - processHeuristics: processHeuristics - } -} \ No newline at end of file diff --git a/lib/style-applicator.js b/lib/style-applicator.js new file mode 100644 index 0000000..0e3c97d --- /dev/null +++ b/lib/style-applicator.js @@ -0,0 +1,26 @@ +exports.HeuristicsProcessor = HeuristicsProcessor; + +function HeuristicsProcessor() { + function processHeuristics(document) { + for (var i = 0; i < document.value.children.length; i++) { + var element = document.value.children[i]; + switch (element.type) { + case 'paragraph': + document.value.children[i] = processParagraph(document.value.children[i]); + break; + } + } + return document; + } + + function processParagraph(element) { + if (element.alignment == 'center' && !element.styleName) { + element.styleName = "CenteredHeading"; + } + return element; + } + + return { + processHeuristics: processHeuristics + } +} \ No newline at end of file -- cgit v1.2.3