Markdown Inline vs Block Rules

AI-generated summary

The discussion revolves around the challenge of implementing BBCode tags that work both as inline and block elements in a markdown-based system. Ghan asks if a single tag can be recognized by both inline and block rules, noting that inline rules are preferable for text on the same line, but block rules are needed for multi-line content. pfaffman suggests that most importers handle this by adding newlines. TheDarkWizard explains that their board uses complex, nested BBCode for effects like fonts and accordions, and while they’ve made progress, they face issues when tags are not on their own line. They are considering fixing tags during import or allowing users to manually correct old posts, acknowledging that some limitations are unavoidable.

Is it possible to have the same tag be recognized by both an inline rule and a block rule?
I’ve been building some bbcode rules and having the tag on the same line as text is very common on our board, making an inline rule better, but at the same time there are often line breaks in the middle of a big block of text, which tends to break the inline rule.

Is there an easy way to reconcile this in the rules engine or is this a bad idea and we should instead look at restructuring posts to fit the tag formatting?

Most importers fix up those tags adding newlines as needed.

People like to use several bbcode together, often nesting them on our board to make really complex effects.

Here are some examples:

They are all very basic and very safe HTML replacements, we got a good chunk of them working until we realized that tags had to be on their line if we wanted to use block rules. We are still missing a few like letting users use any google font with [font=gfontname] and accordions and tabs, but we’ve been getting teething issues out of the way little by little. I’ve sent you a PM about this on your site.

We are definitely discussing fixing the tags via import (we are already turning some of them into the equvilient of markdown) but we might just live with letting users go back and fix old posts as well. There has to be a limit to everything I think.