From bcdf40e8f0bd033bdd6413037fa7d4dd4a63e1b3 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Tue, 6 Apr 2021 09:38:33 +0200
Subject: remove_note() -> remove_from_app()

---
 ekdosis.dtx | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 3e2e6ed..ad01873 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -11208,8 +11208,12 @@ function ekdosis.getprevnotelab()
    return prev_notelab
 end
 
-local function remove_note(str)
-   str = gsub(str, dblbkslash * lpeg.P("note") * cmdargs, "")
+local cmdstorm = lpeg.P(lpeg.P("note")
+			   + lpeg.P("linelabel")
+			   + lpeg.P("index"))
+
+local function remove_from_app(str)
+   str = gsub(str, dblbkslash * cmdstorm * cmdargs, "")
    return str
 end
 
@@ -11223,7 +11227,7 @@ function ekdosis.mdvappend(str, teitype)
       "\\linelabel{" .. current_lnlab .. "-e}"
       ..
       "\\csname append@app\\endcsname{"
-      .. remove_note(str) .. "}"
+      .. remove_from_app(str) .. "}"
    else
    return "\\linelabel{" .. current_lnlab .. "-b}\\wordboundary{}"
       ..
@@ -11232,7 +11236,7 @@ function ekdosis.mdvappend(str, teitype)
       "\\linelabel{" .. current_lnlab .. "-e}"
       ..
       "\\csname append@app\\endcsname" .. "[" .. teitype ..  "]{"
-      .. remove_note(str) .. "}"
+      .. remove_from_app(str) .. "}"
    end
 end
 
-- 
cgit v1.2.3

