From 97adc6c205c69be834661dec8608c15274f17e41 Mon Sep 17 00:00:00 2001 From: Dibyam Kumar <75671040+dibyam1101@users.noreply.github.com> Date: Fri, 27 Oct 2023 10:13:44 +0530 Subject: [PATCH] Change tutorials' code font to monospace font --- new-website/utils/tutorials/export_tutorials.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/new-website/utils/tutorials/export_tutorials.py b/new-website/utils/tutorials/export_tutorials.py index ce074192..bc78d6e2 100644 --- a/new-website/utils/tutorials/export_tutorials.py +++ b/new-website/utils/tutorials/export_tutorials.py @@ -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