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 <[email protected]>: > > Thanks, but I am still missing something here. How does the system > distinguish between a prompt and non-prompt in a code block? > > 1. Is there a new mechanism to specify a prompt, similar to the > sphinx-prompts extension? > 2. Is there some markup within the block to identify the prompt? > 3. Are certain characters at the front of a line detected and treated as > prompts, such as '$' for bash? > > R. > > It would be useful to see a minimal working example of this. > > On Tuesday, September 14, 2021 at 9:48:51 AM UTC-4 [email protected] wrote: >> >> 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 <[email protected]>: >> > >> > 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: >> > https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html?highlight=code-block >> > >> > and building a typical code-block such as the following does not >> > demonstrate changed behaviour. >> > >> > .. code-block:: bash >> > >> > ls >> > >> > or >> > >> > .. code-block:: bash >> > >> > $ ls >> > >> > Can someone please explain how this is configured and invoked? >> > >> > Thanks. >> > >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "sphinx-users" group. >> > To unsubscribe from this group and stop receiving emails from it, send an >> > email to [email protected]. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msgid/sphinx-users/29b9917f-6e18-430a-9765-42553f74a687n%40googlegroups.com. > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/fd008e21-fca1-4e0b-8686-0f4b4180a04dn%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAFmkQAN22F7AFS%3DHR4qH8H9mZNbP8-r6TG8gJeKh_18EMPuGUg%40mail.gmail.com.
