chipsenkbeil / vimwiki-rs

Rust library and tooling to parse, render, and modify vimwiki text and files.
56 stars 2 forks source link

Rewrite text parser #140

Closed chipsenkbeil closed 3 years ago

chipsenkbeil commented 3 years ago

In order to fix a couple of issues, the text parser has slowed down by an order of magnitude.

It's fairly inefficient, checking for every other type of element on each character. Instead, we need a stateful loop that keeps track of the beginning and endings of inline elements.

chipsenkbeil commented 3 years ago

Did a smaller rewrite to check for a specific character before invoking each of the different parsers, which is what we did previously that had a high impact. The only difference is that I've added in support for raw links that looks for a schema before parsing.