I want to have a function which styles the given text, and, if it is full paragraphs, it also styles the paragraphs. If the given text is a part of a larger paragraph, the paragraph should not be styled because that would break the outer paragraph. A specific example of such function is to make alerting text, which would be red bold, but also, if it is full paragraphs or otherwise block content, with a red border.
So the question is: How can I detect what the given content is, either inline or block?
