Skip to content

Commit

Permalink
add minimal size for lines #7
Browse files Browse the repository at this point in the history
  • Loading branch information
DArtagnant committed Jun 5, 2024
1 parent 53f3f9a commit 58c6745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ def format_code(code):
return parseFromToken(tokens, formatter)

def create_lines(nbr):
html = '<td style="padding:0; vertical-align:top; text-align:right; background-color:#bfbfbf; position: sticky; left: 0;"><div><pre>'
html = '<td style="padding:0; vertical-align:top; text-align:right; background-color:#bfbfbf; position: sticky; left: 0; width: 1%; white-space: nowrap;"><div><pre>'
for n in range(1, nbr + 1):
html += f'<span style="padding-right: 5px;">{n}</span>'
html += f'<span style="padding-right: 5px; padding-left: 5px;">{n}</span>'
if n != nbr:
html += "\n"
html += "</pre></div></td>"
Expand Down

0 comments on commit 58c6745

Please sign in to comment.