Trying to parse a Markdown AST to generate a table of contents holy shit want to KMS.
Conversation
Notices
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Sunday, 05-Feb-2023 12:08:02 JST Alex Gleason -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Sunday, 05-Feb-2023 12:10:40 JST Alex Gleason @nekofag will appreciate this
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Sunday, 05-Feb-2023 12:11:03 JST Alex Gleason @nekofag Maybe I’ll do recursion like a real man.
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Sunday, 05-Feb-2023 12:14:07 JST Alex Gleason @graf -
Embed this notice
anime graf mays ?️? (graf@poa.st)'s status on Sunday, 05-Feb-2023 12:14:08 JST anime graf mays ?️? @alex I wake up and want to kill myself. we are NOT the same -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Sunday, 05-Feb-2023 12:28:51 JST Alex Gleason @colinsmatt11 It’s already an AST, I’m just trying to render the table of contents now. Anyway I don’t want to copy anyone’s STD.
-
Embed this notice
MattZ (colinsmatt11@gleasonator.com)'s status on Sunday, 05-Feb-2023 12:28:52 JST MattZ @alex Just copy the code from deno's std. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Sunday, 05-Feb-2023 12:37:11 JST Alex Gleason @NEETzsche @colinsmatt11 I’m pulling Markdown docs from git and trying to display them on the website. To control the order of the items in the sidebar (ie not purely alphabetical) I need a separate file to defile their order. There are a few competing ways to do this:
- Gitbook SUMMARY.md: https://docs.gitbook.com/getting-started/git-sync/content-configuration#summary
- Docusaurus sidebars.json: https://docusaurus.io/docs/sidebar#sidebar-object
I don’t expect any human would actually edit a sidebars.json by hand (even though that’s the intention), so I went with the SUMMARY.md format instead.
But now I need to parse a Markdown file into something a React component can understand.
-
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Sunday, 05-Feb-2023 12:37:12 JST NEETzsche What the fuck is this and why did you post this. Why do you hate me.
In conversation permalink -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Sunday, 05-Feb-2023 12:56:16 JST Alex Gleason @feld @NEETzsche @colinsmatt11 This is not artificial or intelligent.
In conversation permalink -
Embed this notice
feld (feld@bikeshed.party)'s status on Sunday, 05-Feb-2023 12:56:17 JST feld Almost enough if statements to call it Artificial Intelligence In conversation permalink -
Embed this notice
feld (feld@bikeshed.party)'s status on Sunday, 05-Feb-2023 14:09:29 JST feld we prefer the term "organic" or "free-range" In conversation permalink Alex Gleason likes this. -
Embed this notice
NEETzsche (neetzsche@iddqd.social)'s status on Sunday, 05-Feb-2023 14:09:30 JST NEETzsche So it’s natural stupidity?
In conversation permalink
-
Embed this notice