Empty [syntax] tags; "disable bbcode" has no effect

We know you have an opinion on how things should be run around here. These are suggestions for the forums, and the website.This forum is not a place to ask for suggestions to your own coding (or otherwise) problems.

Moderator: General Moderators

Post Reply
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Empty [syntax] tags; "disable bbcode" has no effect

Post by requinix »

1.
The old <code> tags required something in between to be replaced. If I do "" then you see the tags, just like that - helps when telling people to use them.

The new <syntax> tags don't behave this way: "".

2.
<syntax> doesn't observe the "Disable BBCode" posting option.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Empty [syntax] tags; "disable bbcode" has no effect

Post by pickle »

Can't help with 2, but with 1, just put spaces in: [ syntax ][ /syntax ]
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Empty [syntax] tags; "disable bbcode" has no effect

Post by requinix »

I've tried that before, only to have... less educated users put the spaces in it too. And having to tell them to remove the spaces feels demeaning.

Not arguing against using spaces - certainly a simple answer to a simple problem - I'm just saying that if it could be done for the original highlighter...
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Empty [syntax] tags; "disable bbcode" has no effect

Post by Weirdan »

Option 1: Wrap it into

Code: Select all

tag:

Code: Select all

[code]
[syntax="php"]
[/code][/syntax]
renders as

Code: Select all

[syntax="php"]
[/syntax]
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Empty [syntax] tags; "disable bbcode" has no effect

Post by Weirdan »

Option 2: put another tag pair such as inside the [syntax] tag to make it invalid bbcode (doesn't work with post preview though):

Code: Select all

[syntax[i][/i]]
renders as
[syntax]
Post Reply