Refs #1. Updated docstring to accurately reflect the purpose of the function
Refs #1. Use more variables so the code is somewhat self-documented
Refs #1. Replaced multiple docstring tests with a single docstring test that covers the same cases, plus a non-printing character within a tag
Refs #1. Updated test case to include a non-printing character in a tag