Skip to content

Commit

Permalink
Special case down arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelgoto committed Jul 18, 2022
1 parent a41325a commit 40829f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions test.html
Expand Up @@ -2,6 +2,7 @@
<link rel="stylesheet" href="typograms.css"></link>
<br>
<script type="text/typogram" grid zoom=5>
<- hello ->
<- world ->
alive
||
vv
</script>
3 changes: 2 additions & 1 deletion typograms.js
Expand Up @@ -1092,7 +1092,8 @@ function render(diagram) {

if (char.match(/[A-Za-z0-9]/)) {
const [, right, , left] = neighbors;
str = str || (left.match(/[A-Za-z0-9]/) || right.match(/[A-Za-z0-9]/));
// We special case "v", which is a down arrow, and also a text character.
str = str || (left.match(/[A-Za-uw-z0-9]/) || right.match(/[A-Za-uw-z0-9]/));
}

reserved = reserved && !str;
Expand Down

0 comments on commit 40829f6

Please sign in to comment.