T.P.Writers.Shared: add new function removeLinks.

The function converts links to spans. It is used, for example, to avoid
nested links.

The HTML writer used to put the description of nested links into small
caps, but uses a simple *span* now.
This commit is contained in:
Albert Krewinkel
2025-09-09 10:26:05 +02:00
committed by John MacFarlane
parent 6ba552232a
commit 36bbdc667a
5 changed files with 25 additions and 19 deletions
+10
View File
@@ -0,0 +1,10 @@
The heading is "unlinked" before adding it to the TOC.
```
% pandoc --to=latex
<http://example.com/> {-}
=========================
^D
\section*{\texorpdfstring{\url{http://example.com/}}{http://example.com/}}\label{httpexample.com}
\addcontentsline{toc}{section}{{http://example.com/}}
```
+1 -1
View File
@@ -2,5 +2,5 @@
% pandoc -f native -t mediawiki
[Link ("",[],[]) [Link ("",[],[]) [Str "test"] ("https://bar.example.com",""),Str "Test"] ("https://foo.example.com","")]
^D
[https://foo.example.com testTest]
[https://foo.example.com <span>test</span>Test]
```