News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
murgaLua to html
Author Message
Senior Member

Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: murgaLua to html

The color scheme is based on the scheme I use in Vim, which is limited to 8 colors and is essentially the Vim lua syntax file + some additions for FLTK.
If I ever finsh this it will of course be made to allow the user to simply fill in a set of color name variables with whatever value they want.

I was having a terrible time trying to figure out how to do any of the things mentioned above, which is why I left it.
I'll probably need to study some other scripts to see how they do pattern modification.
As this is mainly just a series of gsub commands, it may need almost a total rewrite just to make it more efficient.
I was looking at the markdown.lua script a little while ago, and was amazed at how complicated that script was just to do some minor text formatting (and without even using syntax highlighting).
As far as I can tell, that's overkill when you can simply wrap the whole thing in a pre tag and just concentrate on changing colors.

In any case, this project definitely seems less complex that doing syntax in a text editor....there's no concern about matching exact words in most cases.
Still, I see a LOT of stuff that needs tweaking.

I don't know how you mastered those search strings...all that %stuff confuses me.

I definitely haven't mastered it. I almost always need to have the Lua "string manipulation" section open for reference.
Some of those % are probably not necessary...I use them to escape just about any non-alphanumeric character in string.* patterns just so I don't have to remember which ones are necessary to escape =o)
And I'm constantly referring to the Lua manual to remember when to use * or - or +
Also, there is an unnecessary use of ([^%w]) in there. It technically should be (*%W), since I'm not searching for a set.

03-09-2008 07:56 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
murgaLua to html - mikshaw - 03-09-2008, 05:42 AM
RE: murgaLua to html - iGame3D - 03-09-2008, 06:52 AM
RE: murgaLua to html - mikshaw - 03-09-2008 07:56 AM
RE: murgaLua to html - mikshaw - 03-09-2008, 08:31 AM
RE: murgaLua to html - mikshaw - 03-10-2008, 05:44 AM
RE: murgaLua to html - mikshaw - 03-12-2008, 04:59 AM
RE: murgaLua to html - mikshaw - 03-13-2008, 03:47 AM
RE: murgaLua to html - iGame3D - 03-13-2008, 10:10 AM
RE: murgaLua to html - mikshaw - 03-13-2008, 10:34 AM
RE: murgaLua to html - mikshaw - 03-13-2008, 12:01 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: