WIP: basic implementation of parsing #1

Draft
gmoore wants to merge 1 commit from in-progress into main
Owner

Definitely not done yet. Just got basic code to extract the blocks, and even that's not very good yet. Oh dear!

Definitely not done yet. Just got basic code to extract the blocks, and even that's not very good yet. Oh dear!
gmoore self-assigned this 2026-09-15 00:04:10 +00:00
gmoore left a comment

Just testing, guess I comment on some real issues.

Just testing, guess I comment on some real issues.
@ -12,0 +16,4 @@
finding_closing_backticks := false
for start := 0; start < len(str); {
span_to_check := str[start:]
end, width := strings.index_multi(span_to_check, {"\n\n", "```"})
Author
Owner

Just testing to see how reviewing works on forgejo. Also wondering if index_multi is really the right thing to do here? Could probably do something a bit more specialised to this particular problem. Perhaps check very literally both things at the same time with SIMD.

I just needed something to say to test this, I'll probably not be doing that lol

Just testing to see how reviewing works on forgejo. Also wondering if index_multi is really the right thing to do here? Could probably do something a bit more specialised to this particular problem. Perhaps check very literally both things at the same time with SIMD. I just needed something to say to test this, I'll probably not be doing that lol
Author
Owner

Cool. Just going to resolve this to see what it looks like.

Cool. Just going to resolve this to see what it looks like.
gmoore marked this conversation as resolved
@ -12,0 +36,4 @@
for span in blocks {
fmt.println(span)
fmt.println("---")
Author
Owner

So there's two problems here:

  1. We detect empty blocks, so literally just \n\n as a block. Don't want that!
  2. It's not picking up blocks after a code block.
So there's two problems here: 1. We detect empty blocks, so literally just `\n\n` as a block. Don't want that! 2. It's not picking up blocks after a code block.
Author
Owner

What do replies look like here?

What do replies look like here?
Author
Owner

Ok, I see.

Ok, I see.
Author
Owner

Definitely relatively happy with performance on a single node Forgejo instance. Significantly better than GitHub.

Definitely relatively happy with performance on a single node Forgejo instance. Significantly better than GitHub.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin in-progress:in-progress
git switch in-progress

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff in-progress
git switch in-progress
git rebase main
git switch main
git merge --ff-only in-progress
git switch in-progress
git rebase main
git switch main
git merge --no-ff in-progress
git switch main
git merge --squash in-progress
git switch main
git merge --ff-only in-progress
git switch main
git merge in-progress
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gmoore/mdparse!1
No description provided.