mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-27 13:01:29 +00:00

* Use `<span>` instead of `<font>` in documentation The `<font>` tag was deprecated in [HTML 4.01]. Let's use the verbose but standardized `<span>` tag with discouraged but supported inline styles instead. (I was wrong when I said it was deprecated before I was born; though [HTML 4]'s spec was published in 1997, about 6 months before I was born, `<font>` was only deprecated in HTML 4.01, published 2 years later when I was about 16 months old.) [HTML 4]: https://www.w3.org/TR/REC-html40-971218/ [HTML 4.01]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font * Add script to convert `<span>` to `<font>` in docs ``` $ ./scripts/fix_html_examples.py --help usage: fix_html_examples.py [-h] file [file ...] Convert HTML from Gnome terminal's 'Copy as HTML' feature to use modern <span> tags and inline CSS. This script is idempotent, i.e. multiple invocations will not change the output past the first invocation. positional arguments: file Rust file to update <pre> blocks in. optional arguments: -h, --help show this help message and exit $ ./scripts/fix_html_examples.py src/*.rs Nothing to fix in src/config.rs Nothing to fix in src/handler.rs Updated example colored output in src/lib.rs Nothing to fix in src/private.rs Nothing to fix in src/writers.rs $ ./scripts/fix_html_examples.py src/*.rs Nothing to fix in src/config.rs Nothing to fix in src/handler.rs Nothing to fix in src/lib.rs Nothing to fix in src/private.rs Nothing to fix in src/writers.rs ``` Co-authored-by: Rebecca Turner <rturner@linkedin.com>