From d1cf12490114037341ffbad3ccd6defedea911a5 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Tue, 14 Dec 2021 07:39:11 +0100
Subject: remove_extra_anchors() needs tostring()

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

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 1117273..f1a59e9 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -61,7 +61,7 @@ along with this program.  If not, see
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{ekdosis}
 %<*package>
-    [2021/12/11 v1.5-dev Typesetting TEI xml-compliant critical editions]
+    [2021/12/14 v1.5-dev Typesetting TEI xml-compliant critical editions]
 %</package>
 %<*driver>
 \begin{filecontents}[noheader,overwrite]{bibdata.xml}
@@ -7758,7 +7758,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \paragraph{\textsf{ekdosis} Symbol}
 % \begin{macro}{\eKd}
-% \changes{v1.5}{2021/12/11}{Prints \textsf{ekdosis} indentifying
+% \changes{v1.5}{2021/12/14}{Prints \textsf{ekdosis} indentifying
 % symbol} As of v1.5, \pkg{ekdosis} has its own indentifying
 % symbol. It is produced by \cs{eKd} and best printed with the Old
 % Standard Greek font.
@@ -10696,9 +10696,9 @@ end
 local function remove_extra_anchors(str)
    str = gsub(str, lpeg.Cs("</note>") * inanchor * inopeningnote, function(enote, anchor, bnote)
    			local id_one = string.gsub(anchor, "(%<anchor )(.-)(/%>)", "%2")
-   			id_one = string.sub(get_attr_value(id_one, "xml:id"), 2, -2)
+			id_one = string.sub(get_attr_value(tostring(id_one), "xml:id"), 2, -2)
    			local id_two = string.match(bnote, "target%=.-right%((.-)%)")
-   			id_two = string.gsub(id_two, ".-right%((.-)%)", "%1")
+			id_two = string.gsub(tostring(id_two), ".-right%((.-)%)", "%1")
    			if id_one == id_two
    			then
    			   return string.format("%s%s", enote, bnote)
-- 
cgit v1.2.3

