From 0afc7ebb3f78ef542038419cc627fbb9a9866087 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Sun, 14 Feb 2016 08:55:55 -0500 Subject: [PATCH] tests for single line processing --- tests/single_lines.js | 5 +++++ tests/single_lines.txt | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/single_lines.js create mode 100644 tests/single_lines.txt diff --git a/tests/single_lines.js b/tests/single_lines.js new file mode 100644 index 0000000..3730bd9 --- /dev/null +++ b/tests/single_lines.js @@ -0,0 +1,5 @@ +var converter = require('../index.js'); +var fs = require('fs'); +fs.readFile('single_lines.txt', 'utf8',function(err, data){ + console.log(converter(data)); +}); diff --git a/tests/single_lines.txt b/tests/single_lines.txt new file mode 100644 index 0000000..3f5c6ac --- /dev/null +++ b/tests/single_lines.txt @@ -0,0 +1,7 @@ +if the first line contains a line break after it, it is rendered as a header + +sub headings are single lines that have a line break before and after them, but are not the first line + +This single line contains a period. Therefore, it is rendered as a paragraph. It also contains a link to http://www.google.com, so that is rendered appropriately. + +sub heading 2