Commit 94a73856e1
Verified · cmc
Layout: unified · split
Sources/OrgCore/Export/LaTeXExport.swift +1 −1
| @@ -1608,7 +1608,7 @@ final class LaTeXRenderer { | ||
| 1608 | 1608 | let uri = path.hasPrefix("//") ? "file:" + path : path.hasPrefix("/") ? "file://" + path : path |
| 1609 | 1609 | let protected = Self.protect(uri) |
| 1610 | 1610 | return description.map { "\\href{\(protected)}{\($0)}" } ?? "\\url{\(protected)}" |
| 1611 | case "http", "https", "ftp", "mailto", "news": | |
| 1611 | case "http", "https", "ftp", "mailto", "news", "elisp", "shell", "help", "shortdoc": | |
| 1612 | 1612 | let protected = Self.protect(type + ":" + path) |
| 1613 | 1613 | return description.map { "\\href{\(protected)}{\($0)}" } ?? "\\url{\(protected)}" |
| 1614 | 1614 | default: |
Tests/OrgCoreTests/LaTeXExportTests.swift +1
| @@ -106,6 +106,7 @@ struct LaTeXExportTests { | ||
| 106 | 106 | "Snippets @@latex:\\newpage@@ and @@html:<br>@@ gone. Also @@html:x@@ @@html:y@@ end.\n@@html:z@@ start\n", |
| 107 | 107 | "Line one\\\\\nline two \\\\\n\\\\\nafter\n", |
| 108 | 108 | "Links: [[https://orgmode.org][Org & co]] <https://a.b/c_d> https://x.y/%20 [[mailto:me@x.org]] [[file:doc.pdf][the doc]] [[./rel/file.txt]] [[file:/abs/path.org]]\n", |
| 109 | "Run [[elisp:(+ 1 2)][add]] and [[elisp:(message \"50% #x\")]], [[shell:ls ~/x_y][list]] [[shell:echo $HOME]], [[help:car][car]] [[shortdoc:string]].\n", | |
| 109 | 110 | "* Target section\nA <<anchor>> here and [[anchor]] and [[anchor][desc]].\n* Other\nSee [[*Target section]] and [[Target section][named]] and [[#cid]].\n* Third\n:PROPERTIES:\n:CUSTOM_ID: cid\n:END:\nx\n", |
| 110 | 111 | "#+OPTIONS: num:nil\n* Head\nSee [[*Head]].\n", |
| 111 | 112 | "Footnotes[fn:1] twice[fn:1] and[fn:2][fn:3] and inline[fn::anon /x/] and[fn:named:inline def].\n\n[fn:1] First.\n\n[fn:2] Second\n with two lines.\n\n[fn:3] Third.\n", |