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 like this 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. :)
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
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.