Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Nested [code] tags...
Not Solved

I'm having an issue where if I try 'nesting' code tags, ... basically putting [code] within a [code] tag and have the inner-most pair of code tags ignored. Is there a possibility of having this fixed? Whether it be through manual edits somewhere or a plugin...

I've managed to reproduce the problem here on this board as well.
Not Solved
just wondering - why one needs nested code blocks!
Not Solved
(06-03-2013, 12:59 PM).m. Wrote: just wondering - why one needs nested code blocks!

I'm not specifically asking for code blocks within code blocks, I'm just asking for a fix to have it choose the outer-most code tags, and codify-it-all inside, ignoring the 'nested' one.

The forum I am running has an extremely specific purpose, and we use the [code] mycode quite extensively to facilitate the ability to copy/paste mycode snippets. Some of these snippets would contain their own [code] blocks within, and I'd rather not have them bug out as seen in the testing thread I've created here. I'd simply like the [code] function locate the last closing code tag instead of the first, as it is now.

Edit, did a bit more searching, and based on what I read about regular expressions, ... is there a way to change the regular expression searching for [code] blocks from ungreedy (what we have now) to being greedy (what would produce the effect I want)? I'm currently trying something in class_parser.php, and not having a lick of luck with it..

edit2, found a way to make it greedy, ... but this causes a new problem. ... now if I intend to use multiple code blocks in the same post, its impossible to do. .... so I'm guessing a rewrite of how mybb handles code tags is needed... ...

Forum Jump:

Users browsing this thread: 1 Guest(s)