PDA

View Full Version : BBCode parsing order


NLP-er
09-24-2009, 05:46 PM
In which order BBCodes are parsed? From top do down or from down to top? Is it possible to change this order?

I'mean If I have i.e.
Z

Then X will get text with Y inside or Y will be already parsed?

James Birkett
09-24-2009, 06:03 PM
I think it parses inward.
I.e. https://vborg.vbsupport.ru/
It'll parse the image tag, then the bold I think.

I come to this conclusion because you can wrap noparse tags around BBCodes, so if they went outwards then the tags would be parsed before the noparse being parsed.. if that makes sense.

NLP-er
09-24-2009, 09:22 PM
I think it parses inward.
I.e. text
It'll parse the image tag, then the bold I think.

I come to this conclusion because you can wrap noparse tags around BBCodes, so if they went outwards then the tags would be parsed before the noparse being parsed.. if that makes sense.

I already checked it - it parses from deepest, but images are parsed separately. So there is several blocks of code to parse bbcode. I had to parse images myself in my bbcode, because I need whole content parsed before I do my own changes.