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

Parsing h2 LaTeX Headings into Filenames #6

Open
i13e opened this issue Oct 11, 2023 · 0 comments
Open

Parsing h2 LaTeX Headings into Filenames #6

i13e opened this issue Oct 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@i13e
Copy link
Owner

i13e commented Oct 11, 2023

Title:
Description:
I'm working on converting h2 headings representing problem names into file names, but I've encountered some issues. My current approach is to convert the text to lowercase and replace spaces with underscores using the code below:

formatted_text = re.sub(r'[^\w\s]', '', title.text)
formatted_title = formatted_text.lower().replace(" ", "_")

Problematic Headings:

0675_2omegan.md
0216_the_primality_of_2n_2__1.md
...

I'm looking for suggestions or improvements to make this conversion more reliable. If you have any ideas or recommendations, please feel free to share. Although I'm currently uncertain about pursuing this approach, I'd like to document my progress and any suggestions for future reference.

@i13e i13e added the enhancement New feature or request label Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant