1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

As Designed BB Codes do not work inside of [CODE] blocks

Discussion in 'Resolved Bug Reports' started by Ryan McAdams, Dec 7, 2010.

  1. Ryan McAdams

    Ryan McAdams Active Member

    This is a must have for highlighting code lines...
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    I'm fairly sure this is by design but no doubt Mike will be along shortly to confirm.
     
  3. Ryan McAdams

    Ryan McAdams Active Member

    That seems like a mistake...

    Think about development forums, forums where people are working templates or other forms of code and want to bold or hue a line to make it stand out...?
     
  4. Shadab

    Shadab Well-Known Member

    You can use [code=rich] ... [/code] to enable formatting inside code tags.

    Code:
    public function isWorking()
    {
    	return true;
    }
     
    Brogan likes this.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Nice one Shadab.
    In all the years I've been using code, code=php, etc. I never knew you could do that.
     
  6. Ryan McAdams

    Ryan McAdams Active Member

    Now to figure out how to make that the default...
     
  7. Mike

    Mike XenForo Developer Staff Member

    That's probably because it's unique to us, I think. Never really looked elsewhere though.

    But yes, this is most definitely intentional.
     
    Brogan likes this.
  8. Ryan McAdams

    Ryan McAdams Active Member

    Why? What benefit do you get from blocking bbcode inside of the code tags?
     
  9. Mike

    Mike XenForo Developer Staff Member

    It prevents code that contains elements that resemble BB codes from accidentally executing, thereby breaking the code.
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Such as xen:phrase / xen:phrase for example.
     
  11. Ryan McAdams

    Ryan McAdams Active Member

    ...can we PLEASE make this an option instead of a mandatory stance? A simple "disable smilies" checkbox would fix the majority of those breakages.
     

Share This Page