mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-23 16:36:54 +00:00
Creating new validator
This commit is contained in:
1 parent
cd2337ff2c
commit
c49321d590
1 file changed
+15
-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