diff --git a/README.md b/README.md index 208de81..69a5139 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ repository and update `index.md` with a line under the appropriate section, keeping entries in alphabetical order. The line must be formatted as: - | [Software Name](URL) | Short description | [YYYY-MM-DD / X.X.X](URL) | +``` markdown +| [Software Name](URL) | Short description | [YYYY-MM-DD / X.X.X](URL) | +``` For the third field, the date and version number should be those of the first release of the software available with `NO_COLOR` support, with a link to the @@ -34,8 +36,10 @@ rebuilt within a few minutes. If you are making extensive changes to the output and want to verify them in a browser before committing, you can setup a Jekyll environment with: - no_color$ bundle install - no_color$ bundle exec jekyll serve +``` console +$ bundle install +$ bundle exec jekyll serve +``` And then visit [http://127.0.0.1:4000/](http://127.0.0.1:4000/). diff --git a/_layouts/default.html b/_layouts/default.html index 04d10a9..7d2c2cb 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,15 +1,31 @@ - + NO_COLOR: disabling ANSI color output by default diff --git a/index.md b/index.md index fce22f7..066e53d 100644 --- a/index.md +++ b/index.md @@ -35,22 +35,24 @@ with this standard. ## Example Implementation - #include - #include - #include +``` c +#include +#include +#include - int - main(int argc, char *argv[]) - { - char *no_color = getenv("NO_COLOR"); - bool color = true; +int +main(int argc, char *argv[]) +{ + char *no_color = getenv("NO_COLOR"); + bool color = true; - if (no_color != NULL && no_color[0] != '\0') - color = false; + if (no_color != NULL && no_color[0] != '\0') + color = false; - /* do getopt(3) and/or config-file parsing to possibly turn color back on */ - ... - } + /* do getopt(3) and/or config-file parsing to possibly turn color back on */ + ... +} +``` ## Frequently Asked Questions