]> git.lyx.org Git - features.git/commitdiff
use https:// in the first line of .lyx files
authorUwe Stöhr <uwestoehr@lyx.org>
Sun, 17 Dec 2017 01:24:26 +0000 (02:24 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Sun, 17 Dec 2017 01:24:26 +0000 (02:24 +0100)
- also support to detect https via tex2lyx

lib/lyx2lyx/LyX.py
src/Buffer.cpp
src/tex2lyx/Preamble.cpp
src/tex2lyx/text.cpp

index c76fc589b38b16d68e95929934fd11dd6b8e6c4b..98111d64b413bd86adbf60e2ddf97c8654c83a51 100644 (file)
@@ -533,7 +533,7 @@ class LyX_base:
         " Set the header with the version used."
 
         initial_comment = " ".join(["#LyX %s created this file." % version__,
-                                    "For more info see http://www.lyx.org/"])
+                                    "For more info see https://www.lyx.org/"])
 
         # Simple heuristic to determine the comment that always starts
         # a lyx file
index 79ceb9bfbfd1004795e9998922bd034d1de8897f..294c7a1092ee5a03151f6cca1cfc81f6da28f9ec 100644 (file)
@@ -1610,7 +1610,7 @@ bool Buffer::write(ostream & ofs) const
        // Important: Keep the version formatting in sync with lyx2lyx and
        //            tex2lyx (bug 7951)
        ofs << "#LyX " << lyx_version_major << "." << lyx_version_minor
-           << " created this file. For more info see http://www.lyx.org/\n"
+           << " created this file. For more info see https://www.lyx.org/\n"
            << "\\lyxformat " << LYX_FORMAT << "\n"
            << "\\begin_document\n";
 
@@ -1794,7 +1794,7 @@ void Buffer::writeLaTeXSource(otexstream & os,
        // first paragraph of the document. (Asger)
        if (output_preamble && runparams.nice) {
                os << "%% LyX " << lyx_version << " created this file.  "
-                       "For more info, see http://www.lyx.org/.\n"
+                       "For more info, see https://www.lyx.org/.\n"
                        "%% Do not edit unless you really know what "
                        "you are doing.\n";
        }
@@ -2038,7 +2038,7 @@ void Buffer::writeDocBookSource(odocstream & os, string const & fname,
                        os << from_ascii(tclass.class_header());
                else if (runparams.flavor == OutputParams::XML)
                        os << "PUBLIC \"-//OASIS//DTD DocBook XML V4.2//EN\" "
-                           << "\"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\"";
+                           << "\"https://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\"";
                else
                        os << " PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\"";
 
@@ -2077,7 +2077,7 @@ void Buffer::writeDocBookSource(odocstream & os, string const & fname,
 
                os << "<!-- " << ((runparams.flavor == OutputParams::XML)? "XML" : "SGML")
                                << " file was created by LyX " << lyx_version
-                               << "\n  See http://www.lyx.org/ for more information -->\n";
+                               << "\n  See https://www.lyx.org/ for more information -->\n";
 
                params().documentClass().counters().reset();
 
@@ -4646,7 +4646,7 @@ void Buffer::updateBuffer(UpdateScope scope, UpdateType utype) const
                        // not updated during the updateBuffer call and TocModel::toc_ is invalid
                        // (bug 5699). The same happens if the master buffer is open in a different
                        // window. This test catches both possibilities.
-                       // See: http://marc.info/?l=lyx-devel&m=138590578911716&w=2
+                       // See: https://marc.info/?l=lyx-devel&m=138590578911716&w=2
                        // There remains a problem here: If there is another child open in yet a third
                        // window, that TOC is not updated. So some more general solution is needed at
                        // some point.
@@ -5087,7 +5087,7 @@ int Buffer::charCount(bool with_blanks) const
 Buffer::ReadStatus Buffer::reload()
 {
        setBusy(true);
-       // c.f. bug http://www.lyx.org/trac/ticket/6587
+       // c.f. bug https://www.lyx.org/trac/ticket/6587
        removeAutosaveFile();
        // e.g., read-only status could have changed due to version control
        d->filename.refresh();
index 2b5d7062abb607d87fc0fb22f60d94d05fdc6fbd..fe722f48e27a6503590319c30a43697be2f2ef65 100644 (file)
@@ -1113,9 +1113,9 @@ bool Preamble::writeLyXHeader(ostream & os, bool subdoc, string const & outfiled
        // LyX only knows the following quotes languages:
        // english, swedish, german, polish, french and danish
        // (quotes for "japanese" and "chinese-traditional" are missing because
-       //  they wouldn't be useful: http://www.lyx.org/trac/ticket/6383)
+       //  they wouldn't be useful: https://www.lyx.org/trac/ticket/6383)
        // conversion list taken from
-       // http://en.wikipedia.org/wiki/Quotation_mark,_non-English_usage
+       // https://en.wikipedia.org/wiki/Quotation_mark,_non-English_usage
        // (quotes for kazakh and interlingua are unknown)
        // danish
        if (is_known(h_language, known_danish_quotes_languages))
index 2fe40bde05cadfbab9aa39ac4417e75b3e812609..5330c624cf64fa5b3cb15553316f00cf2d91aab1 100644 (file)
@@ -3621,8 +3621,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);
-                               // handle the case that name is equal to target, except of "http://"
-                               else if (target.substr(i + 3) == name && type == "http:")
+                               // 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;
                        }
                        begin_command_inset(os, "href", "href");