GM Nostriches,
here is a sneak preview of #Alexandria's new Nostr-flavored markup parser, that we at #GitCitadel have been working on. It comes with a suite of tests and so far, it handles:
* wikilinks
* Nostr-entities and addresses, including those within internal and external URLs
* clean hyperlinks
* Markdown, including footnotes and tables
* code blocks for all common programming languages
Thread
GM Nostriches,
here is a sneak preview of #Alexandria's new Nostr-flavored markup parser, that we at #GitCitadel have been working on. It comes with a suite of tests and so far, it handles:
* wikilinks
* Nostr-entities and addresses, including those within internal and external URLs
* clean hyperlinks
* Markdown, including footnotes and tables
* code blocks for all common programming languages
Login to reply
Replies (16)
Omg exactly what i need (and what i thought about creating myself).
I built my parser based on applesauce implementation (using unifiedjs).
Did you use
too ?
GitHub
GitHub - unifiedjs/unified: Parse, inspect, transform, and serialize content with syntax trees
Parse, inspect, transform, and serialize content with syntax trees - unifiedjs/unified
I just winged it, with some typescript. I initially went with markdown-it library, but I had so many special things that I could barely use it and gave up.
We're going to spin it out, along with the tests. so that other people can also use it and we can implement it in all of our products.
I know it looks really simple, but it took weeks to build, and I'll probably be tinkering away on it, indefinitely.
The code syntax is from highlight.js.


highlight.js
The Internet's favorite JavaScript syntax highlighter supporting Node.js and the web.
We're working on:
* a WYSIWYG component with inline-preview and toolbar
* implementing the basic-level markup parsing in the Reading View, so that publications and wiki pages also get fully parsed
* updating https://gitcitadel.com/repos to use the same parser on all events, including issues and kind 1111 replies
* disambiguation page for the wiki, which will also gather some other kinds referencing the same subject, and list them at the bottom of the page (working name "Talk of the Forest")
* universal viewer for all event kinds, so that we can remove all Njump links and replace them with internal links.
Our wiki disambiguation pages will also be topic aggregators for events on TheForest.
That means, whenever someone uses #Alexandria, with a community relay, the wiki pages will perform that service for that relay. That way, you can easily find other people in your community, who are interested in the same topic.
Since you can reply to wiki pages with kind 1111 comments, they can become sort of bulletin boards for that topic.
And highlights, of course.
What's a "wiki page" in that sentence?
Wiki-entry event?
Because you can't reply to the slug, right? Or can you?
Good question. 😂 🤔
I was actually thinking a composite of replies to the individual wikis, but maybe there should be a header for every topic that we can pull.
Just an easy way to tag the [[wiki-slug]] would go a long way for me.
I'm thinking that you might see 3 different wikis for the topic d-tag `french-cooking` and if you just want to talk about French cooking, in general, but not someone's idea of French cooking, in particular, you could reply to the generic header.
And you don't need one for every topic, just for any topic on your community relay.
Or something. We need to think through the workflow.
We could just use a 30040 index, actually. :thinking: