From 52eaf10de2e014bf9af9f6651483c6d499916ee7 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Fri, 14 Jun 2024 21:01:53 +0200 Subject: [PATCH] help: Render mailto:addr as --- format/markdown/markdown.jq | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/format/markdown/markdown.jq b/format/markdown/markdown.jq index 2b8ec853..35b9cd61 100644 --- a/format/markdown/markdown.jq +++ b/format/markdown/markdown.jq @@ -57,7 +57,11 @@ def _markdown_children_to_text($width): | join("") ) as $text | if $text == .destination then $text - else "\($text) (\(.destination))" + else + if .destination | startswith("mailto:") then + "<\(.destination[7:])>" + else "\($text) (\(.destination))" + end end ) elif .type == "code_block" then .literal | rtrimstr("\n") | split("\n") | " " + join("\n ")