• Please note that this section is for questions regarding the forum itself - it is not for fan game-related questions. If you have a question about a fan game, ask in the appropriate thread.

  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Suggestion: An in-line code block

I often find myself using in-line code blocks on Discord, Github, etc. Here,
Code:
 works fine for multiline code blocks, but if I want something in-line for use within a sentence, there isn't really any way; [code] will always introduce a line break and extend to the right edge.

You can do an approximation [span="font-family: inconsolata; border: 1px inset; padding: 2px"]like this[/span] using [span], but that's not particularly convenient. I'm not suggesting that in-line code blocks have to look /exactly/ like that, it was more just showing the type of thing I'm talking about (and usage).

Would it be possible to create a new BB Code tag for this purpose?
 
We'll probably be streamlining bb code in future versions of PC so that code will work contextually (so inline or as a separate code block depending on where the tag is used), but for now I've gone ahead and implemented this. :)

You can now use [icode] to make text appear as code inline with the rest of your text.
 
I was about to interject on this with some ideas and questions but since this got implemented (so soon, wow) I'm basically left speechless.

Thanks for this addition!

The only thing that I guess I might for when the future, is that I'd suggest *not* to streamline the same BBcode tag to work contextually, as there are some places where tags don't work contextually that might induce wrong parsing, or at least difficult / impossible constructs if they are nested with a tag that functions contextually. ATM the clearest example I can think of is css-div and tcat that assume the following bbcode text is parsed from the raw, meaning it is not possible to, say, leave around whitespace or blank lines for clarity without them becoming a whole new paragraph (and a corresponding <p>) in the pre-processed output.

But that's just my two cents for when then.
 
I can't believe I missed this! It's a huge improvement over the [span=font:monospace;background-color:silver]...[/span] I was doing before!
 
Back
Top