diff --git a/doc/pages/commands.asciidoc b/doc/pages/commands.asciidoc index ea4bf9e5..4f9bc851 100644 --- a/doc/pages/commands.asciidoc +++ b/doc/pages/commands.asciidoc @@ -83,7 +83,7 @@ command *q!* has to be used). Aliases are mentionned below each commands. *-markup*::: expand the markup strings in *text* (See - <>) + <>) *-debug*::: print the given text to the *\*debug** buffer @@ -138,7 +138,7 @@ command *q!* has to be used). Aliases are mentionned below each commands. *define-command* [] :: *alias* def + - define a new command (c.f. the 'Declaring new commands' section below) + define a new command (See <>) *map* :: bind a list of keys to a combination (See <>) diff --git a/rc/core/doc.kak b/rc/core/doc.kak index 847e93bd..059fb02a 100644 --- a/rc/core/doc.kak +++ b/rc/core/doc.kak @@ -39,7 +39,7 @@ define-command -hidden doc-parse-anchors %{ # Find sections as add them as imlicit anchors execute-keys \%s ^={2,}\h+([^\n]+)$ evaluate-commands -itersel %{ - set-option -add buffer doc_anchors "%val{selection_desc}|%reg{1}" + set-option -add buffer doc_anchors "%val{selection_desc}|%sh{printf '%s' \"$kak_reg_1\" | tr '[A-Z ]' '[a-z-]'}" } # Parse explicit anchors and remove their text