-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from hildjj/fix-23
Fixes #23. Add null check.
- Loading branch information
Showing
7 changed files
with
172 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ tsconfig.json | |
vendor/*/rationale.md | ||
eslint.config.js | ||
.ncurc | ||
.gitattributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# Snapshot report for `test/index.test.js` | ||
|
||
The actual snapshot is saved in `index.test.js.snap`. | ||
|
||
Generated by [AVA](https://avajs.dev). | ||
|
||
## it handles single-value repeats | ||
|
||
> Snapshot 1 | ||
`<svg class="railroad-diagram" width="256.5" height="153" viewBox="0 0 256.5 153" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">␊ | ||
<g transform="translate(.5 .5)">␊ | ||
<g class="Start">␊ | ||
<path d="M20 87v20m10 -20v20m-10 -10h20"></path>␊ | ||
</g>␊ | ||
<path d="M40 97h10"></path>␊ | ||
<g class="Group rule">␊ | ||
<path d="M50 97h0"></path>␊ | ||
<path d="M206.5 97h0"></path>␊ | ||
<rect x="50" y="36" width="156.5" height="97" rx="10" ry="10" class="group-box"></rect>␊ | ||
<g class="Choice">␊ | ||
<path d="M50 97h0"></path>␊ | ||
<path d="M206.5 97h0"></path>␊ | ||
<path d="M50 97a10 10 0 0 0 10 -10v-33a10 10 0 0 1 10 -10"></path>␊ | ||
<g class="Skip">␊ | ||
<path d="M70 44h116.5"></path>␊ | ||
</g>␊ | ||
<path d="M186.5 44a10 10 0 0 1 10 10v33a10 10 0 0 0 10 10"></path>␊ | ||
<path d="M50 97h20"></path>␊ | ||
<g class="Group repeat-box">␊ | ||
<path d="M70 97h0"></path>␊ | ||
<path d="M186.5 97h0"></path>␊ | ||
<rect x="70" y="68" width="116.5" height="57" rx="10" ry="10" class="group-box"></rect>␊ | ||
<g class="OneOrMore">␊ | ||
<path d="M70 97h46"></path>␊ | ||
<path d="M176.5 97h10"></path>␊ | ||
<g class="comment range">␊ | ||
<text x="92" y="89" class="comment">..</text>␊ | ||
</g>␊ | ||
<g class="comment">␊ | ||
<text x="107.5" y="89" class="comment">2</text>␊ | ||
</g>␊ | ||
<path d="M126 97a10 10 0 0 0 -10 10v0a10 10 0 0 0 10 10"></path>␊ | ||
<g class="Skip">␊ | ||
<path d="M126 117h40.5"></path>␊ | ||
</g>␊ | ||
<path d="M166.5 117a10 10 0 0 0 10 -10v0a10 10 0 0 0 -10 -10"></path>␊ | ||
<path d="M116 97h10"></path>␊ | ||
<path d="M166.5 97h10"></path>␊ | ||
<g class="terminal literal">␊ | ||
<path d="M126 97h-2.5"></path>␊ | ||
<path d="M169 97h-2.5"></path>␊ | ||
<rect x="123.5" y="86" width="45.5" height="22" rx="10" ry="10"></rect>␊ | ||
<text x="146.25" y="101">"x"</text>␊ | ||
</g>␊ | ||
</g>␊ | ||
<g class="comment">␊ | ||
<path d="M70 60h0"></path>␊ | ||
<path d="M122 60h0"></path>␊ | ||
<text x="96" y="65" class="comment">repeat</text>␊ | ||
</g>␊ | ||
</g>␊ | ||
<path d="M186.5 97h20"></path>␊ | ||
</g>␊ | ||
<g class="comment">␊ | ||
<path d="M50 28h0"></path>␊ | ||
<path d="M67 28h0"></path>␊ | ||
<text x="58.5" y="33" class="comment">x</text>␊ | ||
</g>␊ | ||
</g>␊ | ||
<path d="M206.5 97h10"></path>␊ | ||
<path class="End" d="M 216.5 97 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>␊ | ||
</g>␊ | ||
<style>␊ | ||
svg {␊ | ||
background-color: hsl(30,20%,95%);␊ | ||
}␊ | ||
path {␊ | ||
stroke-width: 3;␊ | ||
stroke: black;␊ | ||
fill: rgba(0,0,0,0);␊ | ||
}␊ | ||
text {␊ | ||
font: bold 14px monospace;␊ | ||
text-anchor: middle;␊ | ||
white-space: pre;␊ | ||
}␊ | ||
text.diagram-text {␊ | ||
font-size: 12px;␊ | ||
}␊ | ||
text.diagram-arrow {␊ | ||
font-size: 16px;␊ | ||
}␊ | ||
text.label {␊ | ||
text-anchor: start;␊ | ||
}␊ | ||
text.comment {␊ | ||
font: italic 12px monospace;␊ | ||
}␊ | ||
g.non-terminal text {␊ | ||
/*font-style: italic;*/␊ | ||
}␊ | ||
rect {␊ | ||
stroke-width: 3;␊ | ||
stroke: black;␊ | ||
fill: hsl(120,100%,90%);␊ | ||
}␊ | ||
rect.group-box {␊ | ||
stroke: gray;␊ | ||
stroke-dasharray: 10 5;␊ | ||
fill: none;␊ | ||
}␊ | ||
path.diagram-text {␊ | ||
stroke-width: 3;␊ | ||
stroke: black;␊ | ||
fill: white;␊ | ||
cursor: help;␊ | ||
}␊ | ||
.decision path {␊ | ||
fill: #ccc;␊ | ||
}␊ | ||
g.diagram-text:hover path.diagram-text {␊ | ||
fill: #eee;␊ | ||
}␊ | ||
text.repeat-text {␊ | ||
font: italic 12px monospace;␊ | ||
text-anchor: end;␊ | ||
}␊ | ||
.repeat-box > rect.group-box {␊ | ||
stroke: gray;␊ | ||
stroke-width: 2;␊ | ||
stroke-dasharray: 1 5;␊ | ||
fill: none;␊ | ||
}␊ | ||
.delimiter > rect.group-box {␊ | ||
stroke: gray;␊ | ||
stroke-width: 2;␊ | ||
stroke-dasharray: 1 5;␊ | ||
fill: none;␊ | ||
}␊ | ||
</style>␊ | ||
</svg>␊ | ||
` |
Binary file not shown.