Skip to content

Node module to analyze every html in a given directory and reports a list of files with unclosed html tags.

License

Notifications You must be signed in to change notification settings

marcosbasualdo/UnclosedHtmlTags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UnclosedHtmlTags

node module to analyze every html in a given directory and reports a list of files with unclosed html tags.

Installation:

$ npm install unclosedhtmltags

Usage:

var unclosedhtmltags = require("unclosedhtmltags");
unclosedhtmltags.analyze('.'); //Analyze html in current directory (Recursively analizes children directories too)

// You can also analyze a single file by using the findUnclosed method passing 
// the html file content as string
var fs = require('fs');

var fileContent = fs.readFileSync('./myFile.html').toString();
var result = unclosedhtmltags.findUnclosed(fileContent);
if(result.passed){
    console.log('OK');
}else{
    result.errors.forEach(function(e){console.log('ERROR:', e.message)});
}

About

Node module to analyze every html in a given directory and reports a list of files with unclosed html tags.

Resources

License

Stars

Watchers

Forks

Packages

No packages published