This would not parse anything although I believe the first one should be parsed.

I tried editing the checkClosure() method to add tags that were open.. but no luck

_________________Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.

but i wrote my own parser that will just match the start tag through to the end tag and replace

_________________Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.

Surely there is lots that could be re-factored, but since when has BBcode had to change? If it aint broke don't fix it! (if it has to be changed often then by all means refactor the hell out of it)-- directed at @arborint (even tho your response are excellent advice for learning about refactoring & good practices)

Based on that note I'd change the find & replace arrays to be only ONE array, and use key() and current() to read them out. That way you don't have to jump like 20 lines of code to match them up

While designing a good layout for a webpage, sometimes we need to convert bbcode tag to html and vice versa. Thanks for such simple and yet simple bb tag parser to convert common bb tags to html, and vice versa. Wish you best of luck as a professional coder.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum