Skip to content

Commit 017de06

Browse files
André DietrichAndré Dietrich
authored andcommitted
Add autolinks and escaped urls
1 parent ab45c11 commit 017de06

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,40 @@ title attribute, and it is shown, when the user hovers the link with the mouse.
792792
For more information visit:
793793
https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding
794794

795+
##### Autolinks & Escaping
796+
797+
--{{0}}--
798+
URLs containing parentheses, brackets, or quotation marks can confuse Markdown
799+
parsers, which may misinterpret these characters as part of the link syntax.
800+
The safest solution is to wrap the URL in angle brackets — a feature known as
801+
**autolinks**, supported by most Markdown readers and by LiaScript since
802+
[Version 1.0.5](https://github.com/LiaScript/LiaScript/issues/281).
803+
804+
- Plain autolink: `<https://en.wikipedia.org/wiki/Gymnasium_(Germany)>`
805+
806+
Result: <https://en.wikipedia.org/wiki/Gymnasium_(Germany)>
807+
808+
- Named link with autolink URL: `[Gymnasium (Germany)](<https://en.wikipedia.org/wiki/Gymnasium_(Germany)>)`
809+
810+
Result: [Gymnasium (Germany)](<https://en.wikipedia.org/wiki/Gymnasium_(Germany)>)
811+
812+
813+
--{{1}}--
814+
As an alternative to angle brackets, you can also escape individual parentheses
815+
or brackets with a backslash. This avoids the need for percent-encoding
816+
(e.g., `%28` and `%29`) while keeping the URL readable.
817+
The result looks like follows:
818+
819+
{{1}}
820+
- Escaped URL: `https://en.wikipedia.org/wiki/Gymnasium_\(Germany\)`
821+
822+
Result: https://en.wikipedia.org/wiki/Gymnasium_\(Germany\)
823+
824+
- Named link with escaped URL: `[Gymnasium (Germany)](https://en.wikipedia.org/wiki/Gymnasium_\(Germany\))`
825+
826+
Result: [Gymnasium (Germany)](https://en.wikipedia.org/wiki/Gymnasium_\(Germany\))
827+
828+
795829
##### Preview-Lia 💫
796830

797831
--{{0}}--

0 commit comments

Comments
 (0)