Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Change to
code-block:: text
fromcode-block:: bash
& update the version of pip #937Change to
code-block:: text
fromcode-block:: bash
& update the version of pip #937Changes from 2 commits
d90a975
ede3fed
d1ee5f6
d1795e5
1394c76
4e4adfd
ee40d83
4e01f46
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This isn't a
bash
command, but rather its output, so I think it should betext
: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.
Also, I think these blocks under "Activating Virtual Environments" should similarly separate the command from its output:
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'm pretty sure it's console rather than text.
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.
"Text" removes all semantic meaning from the highlighting, promising you will never do better than text, and making it programmatically indistinguishable from a text output. I'd think
bat
orpowershell
would be better, as that's actually the language this is in, even if there's no current visual difference.console
is supposed to be somewhat agnostic, even if bash-like - was it rendering incorrectly? Also, if they are struggling with output vs. input, what about:? Does that break it up too much? I used to have a "input" and "output" type (gitbook plugin, IIRC) that would handle this nicely. As long as we are consistent, it's easy to refactor in the future - going to "text" makes it harder, because there may really be some "text" blocks that are not Windows shell inputs.
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.
Those are good points re: semantics and refactoring, @henryiii. Since I was the one who originally suggested
text
, I just pushed the change tobat
for Windows inputs (ee40d83), plus a couple remainingbash
for Unix inputs (4e01f46).I don't think
console
is correct for outputs, because according to the docs, it's a "lexer for Bash shell sessions, i.e. command lines, including a prompt, interspersed with output".text
is widely-used throughout this project for outputs.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.
@bhrutledge I think I've seen
console
perform well with windows-based prompts. My understanding that it only highlights the lines starting with some sort of a prompt differently from those that don't.But yes, looking at https://github.com/pygments/pygments/blob/1ea5fc3/pygments/lexers/shell.py#L226 and https://github.com/pygments/pygments/blob/1ea5fc3/pygments/lexers/shell.py#L556, it seems like
doscon
is a windows counterpart of theconsole
lexer.@henryiii I do think that having clear input (with prompt) + output coupled would be beneficial