From 40829f6db1a21ea94310d77328e03d2bfe62c742 Mon Sep 17 00:00:00 2001 From: Sam Goto Date: Mon, 18 Jul 2022 12:23:50 -0300 Subject: [PATCH] Special case down arrows --- test.html | 5 +++-- typograms.js | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test.html b/test.html index 7f9377d..a20b0f9 100644 --- a/test.html +++ b/test.html @@ -2,6 +2,7 @@
diff --git a/typograms.js b/typograms.js index 4275ba6..7943400 100644 --- a/typograms.js +++ b/typograms.js @@ -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;