mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-13 10:15:56 +00:00
Creating new validator
This commit is contained in:
@@ -33,4 +33,4 @@
|
||||
"superagent": "^1.6.1",
|
||||
"vitreum": "^3.2.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user