Skip to content

Commit

Permalink
Merge pull request #30 from Yukino2002/code-font-fix
Browse files Browse the repository at this point in the history
Change tutorials' code font to monospace font
  • Loading branch information
rbharath authored Nov 8, 2023
2 parents 28350a6 + 97adc6c commit 36567b4
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 36567b4

Please sign in to comment.