language tags not stripped in repl :doc #225

Closed
opened 2024-04-05 20:37:15 +00:00 by pennae · 1 comment
Owner

:doc does not strip language tags when rendering code blocks, leading to stuff like this:

❯ nix repl
Lix 2.90.0-lixpre20240328-47b0967
Type :? for help.
nix-repl> :doc builtins.parseFlakeRef
Synopsis: builtins.parseFlakeRef flake-ref

    Parse a flake reference, and return its exploded form.

    For example: nix builtins.parseFlakeRef "github:NixOS/nixpkgs/23.05?dir=lib"  evaluates to: nix { dir = "lib"; owner = "NixOS"; ref = "23.05"; repo = "nixpkgs"; type = "github"; } 

note the extra nix in the explained result set that is the language tag in the inline md document the docs are rendered from.

`:doc` does not strip language tags when rendering code blocks, leading to stuff like this: ``` ❯ nix repl Lix 2.90.0-lixpre20240328-47b0967 Type :? for help. nix-repl> :doc builtins.parseFlakeRef Synopsis: builtins.parseFlakeRef flake-ref Parse a flake reference, and return its exploded form. For example: nix builtins.parseFlakeRef "github:NixOS/nixpkgs/23.05?dir=lib" evaluates to: nix { dir = "lib"; owner = "NixOS"; ref = "23.05"; repo = "nixpkgs"; type = "github"; } ``` note the extra `nix` in the explained result set that is the language tag in the inline md document the docs are rendered from.
pennae added the
bug
label 2024-04-05 20:37:15 +00:00
Owner

This is a limitation of Nix's internal markdown handling but it should be feasible potentially to modify that to at least strip the tags

This is a limitation of Nix's internal markdown handling but it should be feasible potentially to modify that to at least strip the tags
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#225
No description provided.