code-hike / codehike

Marvellous code walkthroughs
https://codehike.org
MIT License
4.39k stars 135 forks source link

Add line numbers to individual hikes, not all on or off by default #352

Closed rachelnabors closed 1 year ago

rachelnabors commented 1 year ago

Seems as though this is all on or off by default, but I'm using hikes for both code and terminal blocks—terminals don't have line numbers, but code editors do. Is there a way to selectively only show these on some hikes and not on others?

pomber commented 1 year ago

Yes. See here

<CH.Code lineNumbers={true}>

```python one.py
print("Hello, world!")
print("Hello, world!")
print("Hello, world!")
```

</CH.Code>
rachelnabors commented 1 year ago

Perfect!