this post was submitted on 04 Apr 2025
16 points (94.4% liked)

Python

6967 readers
71 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
 

Hello if anyone knows of a way to get python-markdown to behave in the way I'd like, or of an alternative way to do it, I'd love some help! My use case is I'm converting .md files made with Obsidian into html files. Obsidian has tags that are a pound sign followed by the tag (so like "#TagName"). When the tag is the first item on a line the pound sign is confused for a heading, even though there is no space after it.

Is there a way that I can avoid this so it only reads it as a heading if there is a space between the pound and the next word? I'm even considering some kind of find/replace logic so I can swap it out with like a link to a page that lists all the pages with that tag or something that gets run before the markdown to html conversion.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] ulterno 0 points 1 day ago

I like kramdown, though not sure if it fixes this particular problem. But it has another nice little way to add tags^[try converting your HTML with headings to a kramdown document and you will see what I am saying].

Also, discount is lovely and small.