Skip to content
Snippets Groups Projects
Commit 59bcdc78 authored by tatsy's avatar tatsy
Browse files

Add unit tests for improve code coverage.

parent 01763f37
Branches
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ module.exports = function parseImageSize(str, pos, max) {
// (2) =300x
// (3) =x200
code = str.charCodeAt(pos);
if (code !== 0x78 /* x */ && (code < 0x30 && code > 0x39) /* [0-9] */) {
if (code !== 0x78 /* x */ && (code < 0x30 || code > 0x39) /* [0-9] */) {
return result;
}
......
......@@ -258,6 +258,26 @@ Coverage. Image
.
<p>![test]( x = 100x200 )</p>
.
.
![test]( x =aaaxbbb )
.
<p>![test]( x =aaaxbbb )</p>
.
.
![test](http://this.is.test.jpg =100x200)
.
<p><img src="http://this.is.test.jpg" alt="test" width="100" height="200"></p>
.
.
![test](<x =100x200)
.
<p>![test](&lt;x =100x200)</p>
.
.
![test](<x> =100x200)
.
<p><img src="x" alt="test" width="100" height="200"></p>
.
Coverage. Link
.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment