Skip to content
This repository has been archived by the owner on Jan 23, 2020. It is now read-only.

Commit

Permalink
update the README instruction.
Browse files Browse the repository at this point in the history
  • Loading branch information
neraliu committed Jun 5, 2015
1 parent 8566e91 commit 11f63d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Since we are only interested in analyzing the execution context of the HTML5 pag

Install the npm context-parser from the npm repo.
```
npm install context-parser
npm install -g context-parser
```

### Server-side (nodejs)
Expand All @@ -63,7 +63,7 @@ parser.contextualize(data);

Run against the HTML5 file with our parser and the state defined in [HTML 5 Specification](http://www.w3.org/TR/html5/syntax.html#tokenization) and print out the state of each character.
```
./bin/context-dump <html file>
./bin/context-dump <html file> <input preprocessing:0|1> <canonicalization:0|1>
HTML-State { statesSize: 819 } +0ms
HTML-State { ch: 0, state: 1, symbol: 0 } +1ms
HTML-State { ch: [0x20], state: 1, symbol: 0 } +1ms
Expand Down
2 changes: 1 addition & 1 deletion bin/context-dump
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Debug.enable(progname);
return 0;
};

if (noofargs <= 5) {
if (noofargs >= 3 && noofargs <= 5) {
if (fs.existsSync(file)) {
var data = fs.readFileSync(file, 'utf-8');
parser.contextualize(data, data.length);
Expand Down

0 comments on commit 11f63d9

Please sign in to comment.