« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/upd8.js
diff options
context:
space:
mode:
Diffstat (limited to 'upd8.js')
-rwxr-xr-xupd8.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/upd8.js b/upd8.js
index de6af973..e425cb77 100755
--- a/upd8.js
+++ b/upd8.js
@@ -1066,6 +1066,9 @@ const replacerSpec = {
             i = closestMatchIndex;
             pushTextNode();
 
+            if (textOnly && closestMatch === tagBeginning)
+                throw makeError(i, `Unexpected [[tag]] - expected only text here.`);
+
             i += closestMatch.length;
 
             if (closestMatch !== tagBeginning) {
@@ -1077,9 +1080,6 @@ const replacerSpec = {
             }
 
             if (closestMatch === tagBeginning) {
-                if (textOnly)
-                    throw makeError(i, `Unexpected [[tag]] - expected only text here.`);
-
                 const iTag = closestMatchIndex;
 
                 let N;