dominoGuru.com
Your Development & Design Resource
Friday Challenge: On-The-Fly Code/Markup-ASCII conversion
06/02/2006 10:39 AM by Chris Toohey
Here's the start of what I hope will catch on: The Friday Challenge.
Today's challenge: On-The-Fly Code/Markup-ASCII conversion
I got an instant message today from a friend, who happens to be building a web-accessible code repository, and asked me if there was a way to publish markup without said markup publishing as markup - meaning that he wanted the markup itself to be visible for dislpay/documentation purposes. Now, the quick answer was the change the < and > characters to their ASCII characters (< and > respectively). This, as I do it for my markup examples, can be a daunting task to say the least. So, what's a markup-generating developer to do? Well - that's today's challenge: build a markup to publish-safe-markup engine. You can pick the client type it's implemented on (Lotus Notes or Web), and I'll post my solution either later tonight or over the weekend as I plan on taking part in these "challenges" as well!
Good luck, and as the comments are HTML-markup ready - feel free to post your code (after you run it through your engine of course) there or email me!