aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/markdown.cc
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2022-08-26 14:03:40 +0200
committerValentin Gagarin <valentin.gagarin@tweag.io>2022-08-26 17:10:41 +0200
commite7dcacbd7ca75bbac8b77e6873160feff875c9c7 (patch)
treec6218048844c9f1d6ca21cac4cdf47648faea6f6 /src/libcmd/markdown.cc
parent33aca20616adb872dfab1b3852fe58b948783cd2 (diff)
do not render relative links in help pages
this simplifies the setup a lot, and avoids weird looking `./file.md` links showing up. it also does not show regular URLs any more. currently the command reference only has few of them, and not showing them in the offline documentation is hopefully not a big deal. instead of building more special-case solutions, clumsily preprocessing the input, or issuing verbal rules on dealing with URLs, should better be solved sustainably by not rendering relative links in `lowdown`: https://github.com/kristapsdz/lowdown/issues/105
Diffstat (limited to 'src/libcmd/markdown.cc')
-rw-r--r--src/libcmd/markdown.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcmd/markdown.cc b/src/libcmd/markdown.cc
index 71f9c8dff..668a07763 100644
--- a/src/libcmd/markdown.cc
+++ b/src/libcmd/markdown.cc
@@ -18,7 +18,7 @@ std::string renderMarkdownToTerminal(std::string_view markdown)
.hmargin = 0,
.vmargin = 0,
.feat = LOWDOWN_COMMONMARK | LOWDOWN_FENCED | LOWDOWN_DEFLIST | LOWDOWN_TABLES,
- .oflags = 0,
+ .oflags = LOWDOWN_TERM_NOLINK,
};
auto doc = lowdown_doc_new(&opts);