From: Oleksandr G. <gav...@gm...> - 2016-02-15 22:58:23
|
How can I highlight interactive REPL sessions? Like: bash# cd ~/sql bash# mysql Password: [mariadb]> select 1; Among: http://pygments.org/docs/lexers/ I see possibility to use various: .. code:: bash .. code:: console .. code:: pycon .. code:: postgresql-console but even with Bash it only highlight "$" sign and think my "bash#" prompt as output... I see a way to add to "code" additional parameter (prompt regex): http://docutils.sourceforge.net/docs/ref/rst/directives.html#code and implement parser in pygments or make own directive: .. repl:: :prompt1: "^bash# " :prompt2: "^$ " :prompt3: "^mysql> " Does anyone work on this? -- http://defun.work/ |