Skip to content

Commit

Permalink
remove function for previous version
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariana Vivas authored and Mariana Vivas committed Nov 5, 2024
1 parent 88156af commit f7df3d0
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,6 @@ def get_first_level_headers(language, folder, filenames):
print(f"File not found: {base_path}")
return headers

def load_sidebar_tabs(language, folder="docs"):
"""Load tabs from the side_bar.md file based on the selected language."""
sidebar_file_path = f"{folder}/{language.lower()}/side_bar.md"

if os.path.exists(sidebar_file_path):
with open(sidebar_file_path, 'r', encoding='utf-8') as f:
content = f.read().strip().splitlines()

# Return the lines as the tabs list (assuming each line is a tab)
return [line.strip() for line in content if line.strip()]
else:
st.error(f"Sidebar file not found for language: {language}. Check the file path.")
return [] # Return an empty list if file not found

def run_code_editor(default_code, global_namespace, height=[2,30], key=None):
"""
Run the code editor in Streamlit with a shared global namespace.
Expand Down

0 comments on commit f7df3d0

Please sign in to comment.