commit d3b59050072669b49a64c28ca15d0b87d19a8d0c
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Mon Dec 26 10:40:39 2022 +0100

    tex2lyx: support "Other" type
---
 src/tex2lyx/text.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index b4afeee..6e58fba 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -4454,6 +4454,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, 
bool outer,
                                type = target.substr(0, i + 1);
                                if (type == "mailto:"; || type == "file:")
                                        target = target.substr(i + 1);
+                               else if (target.find("://") == string::npos)
+                                       type = "other";
                                // handle the case that name is equal to 
target, except of "http(s)://"
                                else if (target.substr(i + 3) == name && (type 
== "http:" || type == "https:"))
                                        target = name;
@@ -4462,7 +4464,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, 
bool outer,
                        if (name != target)
                                os << "name \"" << name << "\"\n";
                        os << "target \"" << target << "\"\n";
-                       if (type == "mailto:"; || type == "file:")
+                       if (type == "mailto:"; || type == "file:" || type == 
"other")
                                os << "type \"" << type << "\"\n";
                        os << "literal " << lit << "\n";
                        end_inset(os);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to