diff --git a/docs/pygments.md b/docs/pygments.md index 4c0d03e84..5d1b0d771 100644 --- a/docs/pygments.md +++ b/docs/pygments.md @@ -56,11 +56,11 @@ This `ansi-html` formatter is designed to only work with the `ansi-color` lexer. ### Formatter usage -To test it, let's generate a `cowsay.ansi` file that is full of ANSI colors: +To test it, let's generate a `cowsay.ans` file that is full of ANSI colors: ```ansi-shell-session -$ fortune | cowsay | lolcat --force > ./cowsay.ansi -$ cat ./cowsay.ansi +$ fortune | cowsay | lolcat --force > ./cowsay.ans +$ cat ./cowsay.ans  ________________________________  / Reality is for people who lack \ \ imagination.                   / @@ -84,7 +84,7 @@ from pygments.formatters import get_formatter_by_name lexer = get_lexer_by_name("ansi-color") formatter = get_formatter_by_name("ansi-html") -ansi_content = Path("./cowsay.ansi").read_text() +ansi_content = Path("./cowsay.ans").read_text() print(highlight(ansi_content, lexer, formatter)) ``` @@ -295,10 +295,10 @@ See how the raw string is split into Pygments tokens, including the new `Token.C Because they're properly registered to Pygments, all these new components can be invoked with the [`pygmentize` CLI](https://pygments.org/docs/cmdline/). -For example, here is how we can render the `cowsay.ansi` file from the [example above](<>) into a standalone HTML file: +For example, here is how we can render the `cowsay.ans` file from the [example above](<>) into a standalone HTML file: ```ansi-shell-session -$ pygmentize -f ansi-html -O full -o cowsay.html ./cowsay.ansi +$ pygmentize -f ansi-html -O full -o cowsay.html ./cowsay.ans $ cat cowsay.html ```