commit 90caa67aba128ad8c04a1f3414ef3dc823ffa7af
Author: Juergen Spitzmueller <[email protected]>
Date: Thu Aug 7 09:00:25 2025 +0200
tex2lyx: catch \hyperref[<opt>]{<arg>}
The syntax file has a version with different argument structure,
and there can only be one in that file
Spotted via #13183
---
src/tex2lyx/text.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index ec4da204b0..e0728d2585 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -4518,6 +4518,15 @@ void parse_text(Parser & p, ostream & os, unsigned
flags, bool outer,
continue;
}
+ if (t.cs() == "hyperref" && p.hasOpt()) {
+ // Catch this since the syntax file covers versions
+ // without optional argument
+ string const opt = p.getOpt();
+ output_ert_inset(os, t.asInput() + opt + "{" +
+ p.verbatim_item() + '}', context);
+ continue;
+ }
+
if (t.cs() == "lyxline") {
// swallow size argument (it is not used anyway)
p.getArg('{', '}');
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs