# Como adicionar números de linha aos blocos de código?

**URL:** https://meta.discourse.org/t/how-to-add-line-numbers-to-code-blocks/329970
**Category:** Support
**Created:** [8 Outubro , 2024 22:31 UTC](https://meta.discourse.org/t/how-to-add-line-numbers-to-code-blocks/329970 "2024-10-08T22:31:44Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [8 Outubro , 2024 22:42 UTC](https://meta.discourse.org/t/how-to-add-line-numbers-to-code-blocks/329970/3 "2024-10-08T22:42:51Z")

</div>

Esse Tópico contém o CSS que eles usaram, com o qual você poderia experimentar em seu próprio Componente local.

Veja a partir desta postagem em diante

> [@Is it possible to show line numbers in code block?](https://meta.discourse.org/t/is-it-possible-to-show-line-numbers-in-code-block/204178/5?u=merefield):
>
> I’ve been experimenting with line numbers for both wrapping and scrolling on the Docker forum. This is not live yet, but I’d like to know if someone has any comments. So, some screenshots first: Wrapped content Above, line numbers help identifying when one line stops and another starts. Of course, there are other ways to render that, but this topic is about line numbers. nerd_faceScrolled content With limited padding on the side(s) where content is hidden, to indicate that scr…

Que pena que ninguém empacotou isso em um Componente de Tema no GitHub para um uso mais fácil?

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-line-numbers-to-code-blocks/329970)._
