From c49321d5905c4cfbf5b5afc7027fbfd1d178ca63 Mon Sep 17 00:00:00 2001 From: Scott Tolksdorf Date: Wed, 14 Sep 2016 22:32:29 -0400 Subject: [PATCH] Creating new validator --- package.json | 2 +- shared/naturalcrit/markdown.js | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ce2c482..548f282 100644 --- a/package.json +++ b/package.json @@ -33,4 +33,4 @@ "superagent": "^1.6.1", "vitreum": "^3.2.1" } -} +} \ No newline at end of file diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index dc2d63d..d4fbe81 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -17,7 +17,21 @@ module.exports = { render : (rawText)=>{ return Markdown(rawText, {renderer : renderer}) }, - validate : (rawText)=>{ + + validate : (rawText) => { + + var res = xmllint.validateXML({ + xml: rawText, + schema: "String" + }); + + console.log(res); + + + }, + + + validate2 : (rawText)=>{ var currentLine = 0; var errors = []; var tokens = Markdown.lexer(rawText, {renderer : renderer});