Not sure how it works but you could always limit to a certain number of lines, retaining the formatting
comment = '...'
max_lines = 8
truncated = '\n'.join(comment.split('\n')[:max_lines])
Not sure how it works but you could always limit to a certain number of lines, retaining the formatting
```
comment = '...'
max_lines = 8
truncated = '\n'.join(comment.split('\n')[:max_lines])
```
(post is archived)