Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab label number remove bug fix #8

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _projects/fainting_goats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ authors:
- Doctor Foster
tabs:
- {
name: qlcxqfnn,
name: tetqfbgs,
type: html,
source: _03_data.html,
label: 03 Data
label: Data
}
---

Expand Down
6 changes: 3 additions & 3 deletions _utils/jekyllify.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ def generate_label_from_filename(stem:str) -> str:
"""Given a filename stem (e.g. 03_code-and_data) convert this to a label by:

1. replacing any - or _ characters with spaces
2. removing any digits at the start of the filename
3. removing any whitespace remaining at the start or end of the name
2. removing any whitespace remaining at the start or end of the name
3. removing any digits at the start of the filename
4. converting the name to title case"""
label = stem.replace("_"," ").replace("-"," ")
label = re.sub("^[\d]*","",label)
label = label.strip()
label = re.sub("^[\d]*","",label)
return label.title()

def generate_title_yaml(dir:Path) -> str:
Expand Down