summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-bkm.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/strc-bkm.mkiv')
-rw-r--r--tex/context/base/strc-bkm.mkiv6
1 files changed, 5 insertions, 1 deletions
diff --git a/tex/context/base/strc-bkm.mkiv b/tex/context/base/strc-bkm.mkiv
index 5f1acb686..48273787a 100644
--- a/tex/context/base/strc-bkm.mkiv
+++ b/tex/context/base/strc-bkm.mkiv
@@ -74,7 +74,11 @@
\def\strc_bookmarks_bookmark_yes[#1]#2%
{\begingroup
\simplifycommands
- \ctxcommand{overloadbookmark("#1",\!!bs\detokenize\expandafter{\normalexpanded{#2}}\!!es)}%
+ \ifnum\thenamedheadlevel{#1}>\zerocount
+ \ctxcommand{overloadbookmark("#1",\!!bs\detokenize\expandafter{\normalexpanded{#2}}\!!es)}%
+ \else
+ \strc_lists_write_to[#1][]{#2}{}% todo: a dedicated bookmark writer
+ \fi
\endgroup}
\def\strc_bookmarks_bookmark_nop[#1]#2%