Saturday, August 22, 2009

prettyprint.js Does a Good Job

Pick some historical content on this blog. Observe that anything that had " used has become smart quotes.

I've upgraded the pretty print script to do some automagic conversion from simple double quotes to the prettier ``smart'' ones. The caveat will be that unbalanced double quotes will cause the regex converter to go wonky---I don't see this as a big problem though. At the very least, if we had only a single double quote character starting a line, and have the next line starting with yet another single double quote, as long as there are intervening tags in between, prettyprint.js will actually do the right job.

The things that I do to obtain better viewing for the stuff I write...

...till next time.

No comments: