Can BBCode translation be disabled inside a code block?

  • Context: Suggestion 
  • Thread starter Thread starter PeterDonis
  • Start date Start date
Messages
49,478
Reaction score
25,522
In a recent thread in the computer forum, a member posted Python code that was inadvertently changed by something in the posting process. @Mark44 suggested that it could be BBCode translation (a lower case i inside brackets, [i], which was an array reference in the code, got changed to an upper case I, and [I] is BBcode for starting an italics block). The Python code was inside a [CODE] block; would it be possible to disable BBCode translation inside code blocks?

@Mark44's post in the thread in question is here:

https://www.physicsforums.com/threads/python-code-returning-none.1012334/post-6599954
 
Physics news on Phys.org
[CODE title="testing"]

[/CODE]

I was always under impression BBCode IS ignored in the code blocks and - at least when I post from my computer - that seems to be the case.

Could be it gets processed when the post is edited or dealt with in some specific way.
 
I've seen this happen where a bracketed i gets treated as a BBCode italics start tag. I can't reproduce this now for some reason.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 183 ·
7
Replies
183
Views
80K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K