My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

jsPrettify converts plain ASCII punctuation characters into “smart” Unicode typographic characters. It’s written in Javascript, so you can use it virtually anywhere online, either to clean up your own outgoing text before it’s sent or to prettify sites you host or visit.

jsPrettify performs the following transformations:

  • Straight quotes ("" and '') are converted into curly quotes (“” and ‘’).
  • Hyphen-dashes (“---” and “--”) are converted to em- and en-dashes (“—” and “–”).
  • Three dots (“...”) are converted to a horizontal ellipsis character (“…”).

Check out a live demo:

Read about

jsPrettify can work on strings or on HTML DOM elements. Because it works in your browser, it doesn’t have to parse HTML; it just walks the pre-existing DOM structure. Because it’s written using Google Closure, it’s extremely likely to work in your browser—I’ve personally tested it in Google Chrome, Firefox 3+, and IE6+.

If you use jsPrettify, show your support by adding it to your stack on Ohloh!

Powered by Google Project Hosting