ActivityPub Viewer

A small tool to view real-world ActivityPub objects as JSON! Enter a URL or username from Mastodon or a similar service below, and we'll send a request with the right Accept header to the server to view the underlying object.

Open in browser →
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "type": "Page", "id": "https://lemmy.zip/post/35579839", "attributedTo": "https://lemmy.zip/u/ArmoredThirteen", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "[Solved] Using markdown library to convert to html pages isn't formatting how I would like it to", "cc": [], "content": "<p>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.</p>\n<p>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.</p>\n<p>Edit:\nThe solution I’m going for is a regex find/replace. Currently the string pattern looks like <code>“#[^\\s#][^\\s” + string.punctuation + “#]*”</code> which can find tags but ignores headers. Since the ultimate goal is to have the tags link to a tag page anyway I can solve it all in one step by doing a replace with a relevant link.</p>\n", "mediaType": "text/html", "source": { "content": "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.\n\nIs 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.\n\nEdit:\nThe solution I'm going for is a regex find/replace. Currently the string pattern looks like `\"#[^\\s#][^\\s\" + string.punctuation + \"#]*\"` which can find tags but ignores headers. Since the ultimate goal is to have the tags link to a tag page anyway I can solve it all in one step by doing a replace with a relevant link.", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-04-04T06:44:24.313714Z", "updated": "2025-04-07T18:04:05.549724Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemmy.zip/post/35579839", "name": "#python", "type": "Hashtag" } ] }