f3 icon indicating copy to clipboard operation
f3 copied to clipboard

readthedocs rst rendering treats "#" as comments

Open Artoria2e5 opened this issue 1 year ago • 4 comments

This is a very minor thing, but https://fight-flash-fraud.readthedocs.io/en/stable/introduction.html#quick-capacity-tests-with-f3probe currently renders like: image

I think there's something called "bash-session" or "shell-session" in Pygments that takes into account the prompt symbol ($ or #), unlike "bash" or "shell".

Artoria2e5 avatar Feb 28 '24 05:02 Artoria2e5

I'm open to pull requests to improve the documentation.

AltraMayor avatar Feb 28 '24 14:02 AltraMayor

Frankly, I don't see where the problem is. Granted, the shell command for ordinary user and root user depicted by $ and # are apparently rendered differently, but I'd say that is useful.

Is this really bug or am I just missing it?

leggewie avatar Mar 07 '25 08:03 leggewie

Well sorry for not making a PR still but compare

(shell)
# ./f3fix --last-sec=16477878 /dev/sdb

with what you get from

pygmentize -l shell-session <<< "# ./f3fix --last-sec=16477878 /dev/sdb"

See also https://pygments.org/docs/terminal-sessions/

https://pygments.org/docs/lexers/#pygments.lexers.shell.BashSessionLexer

Artoria2e5 avatar Mar 09 '25 01:03 Artoria2e5

Well sorry for not making a PR still but compare

(shell)

./f3fix --last-sec=16477878 /dev/sdb

with what you get from

pygmentize -l shell-session <<< "# ./f3fix --last-sec=16477878 /dev/sdb"

See also https://pygments.org/docs/terminal-sessions/

https://pygments.org/docs/lexers/#pygments.lexers.shell.BashSessionLexer

Thank you for the follow-up. I'd rather not run an unnecessary f3fix. Maybe you can provide a screenshot.

leggewie avatar Mar 17 '25 02:03 leggewie