More context info for codeblocks

Is it possible to tell goldmark to always put texts a paragraph within when inside a blockquote, within render-codeblock ? I’m trying to get uniform text indentation and currently it only works with paragraphs, which are not added when it finds only one block of text.
I wouldn’t mind adding text-indent to the blockquote element instead, the problem is it only shifts ::before and ::after elements, screwing with my layout.

CSS is the best approach to do that. I don’t know how it affects your layout, it maybe not hard to solve, i.e. put text-indent: 0 in ::before and ::after to reset it if necessary. But here may not the right place to ask questions about CSS.

Although you can also achieve that via JS or template (regex express to parse and regenerate the content), IMO, both of them are expensive, not recommended.

Actually I made a mistake and did not complete the firs sentence, without which nothing makes sense :sweat_smile: What I meant is, the same way we have the option wrapStandAloneImageWithinParagraph = false, is there / could we have the same for codeblocks which would automatically put the .inner inside a paragraph if it includes none. But strings.Contains should very well do the trick.
The css solution is not obvious across the board, but I’ll ask elsewhere.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.