Advertisement
2002VB Internet/ HTML #23413

FastHTML/XML Highlight

Highlights HTML and XML properly You can Highlight all text or just selected text and highlights syntax as you type. Will parse standard size files 10-60k instantly 500k files in about 6 seconds. Now you can easily change the colors thanks to M.Bartlema A much faster version is on the way! By the way, If you are wondering why this highlighter is so much faster and supports syntax better than most post here the answer is Regular Expressions. M.Bartlema was able to speed his code up 3 times by replacing a single VBReplace with a regExp. His code is currently faster than mine by the way. We hope to post a regExp tutorial in the near future that will blow your minds in two ways. 1. A single regExp can replace a lot of code 2. They scream!!! A small example? ok this regEx replace highlights all HTML tags one color. tmpstr = ReplaceText("(]+>)", "\plain\f2\fs17\cf1 $1\plain\f2\fs17\cf0 ", tmpstr) Of course this assumes that you have a color table in the rtf with 2 colors. Any other way is a waste of time - literally!

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Upload
Original Comments (3)
Recovered from Wayback Machine