Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 880 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 880 Bytes

Tag-checker

This is an exercise, check the tags in a paragraph are correct or not, it'll read the content of the input file and check the tags.

  • Empty string or no tag paragraph are both considered as correct.

Example

Correct ones:

  • The following text<C><B>is centred and in boldface</B></C>
  • <B>This <\g> is <B>boldface</B> in <<*> a</B> <\6> <<d>sentence

Incorrect ones:

  • <B><C> This should be centred and in boldface, but the tags are wrongly nested </B></C>
  • <B>This should be in boldface, but there is an extra closing tag</B></C>
  • <B><C>This should be centred and in boldface, but there is a missing closing tag</C>

Usage

With npm do:

npm install
npm run start <your input file>