This comes complete with some documentation and node tests, and is a key step towards implementing RTL support in Zulip.