Skip to content

Commit

Permalink
Change tutorials' code font to monospace font
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyam1101 authored Oct 27, 2023
1 parent 28350a6 commit 97adc6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions new-website/utils/tutorials/export_tutorials.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def parse_and_export_tutorials():
for heading in headings:
del heading['id']

# Add the class 'overflow-x-scroll' to all the pre tags in the html file
# Add the class 'overflow-x-scroll' and 'font-mono' to all the pre tags in the html file. The Pre tags correspond to the code snippets within the notebooks.
code_cells = body.find_all('pre')
for code_cell in code_cells:
code_cell['class'] = code_cell.get(
'class', []) + ['overflow-x-scroll']
'class', []) + ['overflow-x-scroll', 'font-mono']

# Hide the body tag of the html file
soup.find('body').hidden = True
Expand Down

0 comments on commit 97adc6c

Please sign in to comment.