New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pill 07: readable code form, fix to shell variable quoting #73
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plain text files will cause the nix-repl
to be no longer formatted as screen dump and the user input will not be visually distinguished.
@@ -1,7 +0,0 @@ | |||
<screen xmlns="http://docbook.org/ns/docbook"><prompt>nix-repl> </prompt><userinput>:l <nixpkgs></userinput> | |||
<prompt>nix-repl> </prompt><userinput>simple = derivation { name = "simple"; builder = "${bash}/bin/bash"; args = [ ./simple_builder.sh ]; gcc = gcc; coreutils = coreutils; src = ./simple.c; system = builtins.currentSystem; }</userinput> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just change this input to multi-line – nix-repl supports line continuation after all.
It is weird that instead of (source: https://nixos.org/nixos/nix-pills/working-derivation.html) |
Oh gush. Do I and we really need to study a book on DocBook to make multi-lines. If Because seems like now we have both at the same time. And I not touched example right under changes (in "Enough of nix-repl") - because it presents formatted code block content, and it is Or I need to also read a book to format code. Ok. |
I can make it multi-line by inserting line-breaks So should I do that? Or I need more research and do something else. |
At this point I not found a better way for DocBook then to spam And this is the best professional suggestions found so far:
(aka "disable the DocBook parsing for code blocks") OR
(aka "if you use a DocBook to get HTML - avoid DocBook formatting in code blocks, and use CSS directly") And it is a source "DocBook XSL: The Complete Guide, Fourth Edition": http://www.sagehill.net/docbookxsl/ProgramListings.html |
TXT definitely works much worse than DocBook – it does not format the screen dump, nor does it distinguish between the user input and output. The line breaks are there in the DocBook, you just need to fix the CSS (see the second screenshot above). Something like the following should work: div.docbook pre code {
white-space: pre;
} |
Ok. Thank you. I really do not know CSS. I would do my best, when I get back to this one. |
I don't think so, the existing code is well structured and semantically nice. New submissions don't have to be so complicated, but there is not a good reason to undo it for the existing stuff. I'd be interested in PR to fix the whitespace handling. |
nix-repl
would popup - included that warnings, and explained that they are not relevant at that moment.