Ahoj,
Dňa Wed, 15 Sep 2021 00:36:26 +0900 Komiya Takeshi
napísal:
> On the other hand, in bash's case, it can't recognizes "$" as a
> prompt. So there is no special styles on the output.
>
> $ echo '$ A prompt' | pygmentize -l bash -f html
> $ A prompt
>
>
> So some contribution would be need
In python's case, the pygmentize command (CLI of pygments) recognizes
">>>" as a prompt and gives style to it.
$ echo '>>> A prompt' | pygmentize -l python -f html
>>> A prompt
On the other hand, in bash's case, it can't recognizes "$" as a
prompt. So there is no special styles on the output.
Thanks again. That sounds simple enough from a user perspective. With:
.. code-block:: bash
$ A prompt?
The '$' should be unelectable in the output, but this is pasted from the
html:
$ A prompt?
I am using 4.2
On Tuesday, September 14, 2021 at 10:54:56 AM UTC-4 i.tk...@gmail.com wrote:
>
Ah, sorry. I had to describe that. We use highlighting library
pygments to detect prompts. It can parse the code-block and can
recognize the kind of each token.
2021年9月14日(火) 23:22 Ron Stone :
>
> Thanks, but I am still missing something here. How does the system
> distinguish between a prompt an
Hi,
>Can someone please explain how this is configured and invoked?
The latest Sphinx uses CSS to make prompts unselectable.
refs: https://developer.mozilla.org/en-US/docs/Web/CSS/user-select
Thanks,
Takeshi KOMIYA
2021年9月14日(火) 18:42 Ron Stone :
>
> Hi,
>
> I originally posted this to sphinx-d
Hi,
I originally posted this to sphinx-dev but now believe it belongs here.
Apologies for cross-posting.
I am using Sphinx 4.2. I see this merge re making prompts in code blocks
unelectable.
https://github.com/sphinx-doc/sphinx/pull/9120
I don't see any documentation of how this works here: