# More context info for codeblocks

**URL:** <https://discourse.gohugo.io/t/more-context-info-for-codeblocks/44675>\
**Category:** support\
**Created:** [June 3, 2023, 12:07pm UTC](https://discourse.gohugo.io/t/more-context-info-for-codeblocks/44675 "2023-06-03T12:07:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Durand](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tom_durand/32/14460_2.png) [@Tom\_Durand](https://discourse.gohugo.io/u/Tom_Durand)\
**Post date:** [June 3, 2023, 12:07pm UTC](https://discourse.gohugo.io/t/more-context-info-for-codeblocks/44675/1 "2023-06-03T12:07:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![razon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/razon/32/14882_2.png) [@razon](https://discourse.gohugo.io/u/razon)\
**Post date:** [June 4, 2023, 6:54am UTC](https://discourse.gohugo.io/t/more-context-info-for-codeblocks/44675/2 "2023-06-04T06:54:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tom\_Durand](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tom_durand/32/14460_2.png) [@Tom\_Durand](https://discourse.gohugo.io/u/Tom_Durand)\
**Post date:** [June 4, 2023, 10:36am UTC](https://discourse.gohugo.io/t/more-context-info-for-codeblocks/44675/3 "2023-06-04T10:36:26Z")

</div>

Actually I made a mistake and did not complete the firs sentence, without which nothing makes sense 😅 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.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [June 6, 2023, 10:37am UTC](https://discourse.gohugo.io/t/more-context-info-for-codeblocks/44675/4 "2023-06-06T10:37:01Z")

</div>

Closed on June 6, 2023, 10:37am UTC

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