rspec-documentation

0.0.11
Light Mode Dark Mode

ANSI

If your code’s output includes colors encoded with ANSI Escape Codes use the ```rspec:ansi formatter to translate the codes into HTML.

8-bit colors and RGB color codes are supported.

Markdown

```rspec:ansi
subject do
  "\e[34mfoo\e[0m\e[0m \e[32mbar \e[36mfoo, bar, baz\e[0m\e[32m with " \
  "\e[36mqux\e[0m\e[32m and quux\e[0m\e[0m and corge with " \
  "\e[38;5;153mpale blue and " \
  "\e[38;2;235;12;186mRGB PINK\e[0m\e[0m"
end

it { is_expected.to include "\e[38;2;235;12;186mRGB PINK" }
```

Output

subject do
  "\e[34mfoo\e[0m\e[0m \e[32mbar \e[36mfoo, bar, baz\e[0m\e[32m with " \
    "\e[36mqux\e[0m\e[32m and quux\e[0m\e[0m and corge with " \
    "\e[38;5;153mpale blue and " \
    "\e[38;2;235;12;186mRGB PINK\e[0m\e[0m"
end

it { is_expected.to include "\e[38;2;235;12;186mRGB PINK" }
foo bar foo, bar, baz with qux and quux and corge with pale blue and RGB PINK

Documentation generated by rspec-documentation