Commit graph

6 commits

Author SHA1 Message Date
Yorhel
f0df5092c3 Rust dep updates 2019-05-25 08:27:23 +02:00
Yorhel
8487d37aad web: Updating Cargo deps + fixes for stable 2018-03-25 08:15:22 +02:00
Yorhel
1923b9901d Support bold+italic in HTML conversion 2017-01-16 09:52:32 +01:00
Yorhel
746889851c A few more HTML conversion improvements
- Fix segfault on empty output (bug was in XS code)
- Still better end-of-URL detection
- Recognize a few common multicharacter sections in man references
2017-01-15 20:27:16 +01:00
Yorhel
1ccc86ce86 Whole bunch of HTML conversion improvements
- Grotty escape sequences are now better interpreted. I feel rather
  stupid for not realizing the idea behind how those codes are supposed
  to work earlier. It finally hit me when I read the BSD ul(1) source
  code.
- URL end detection is slightly better (much better than the old C code)
- Man page references with : are recognized now (common in Perl modules).
- More efficient HTML escaping, no need to escape > and ".

There's still a bunch of improvements to make, but I have much more
confidence in the current implementation already.
2017-01-15 17:07:03 +01:00
Yorhel
6114b17389 Experimental rewrite of grotty to html conversion in Rust
The previous C code was troublesome.
- Didn't handle long lines
- I couldn't convince myself that it was free of memory safety issues
- Needed improving anyway, there are some formatting bugs. These are
  hard to fix in the current code.

I mostly replicated the formatting bugs of the old C implementation in
Rust, and possibly added a few new bugs as well. It's not a significant
improvement right now, more testing and fixing will be needed.

The performance of both implementations is comparable, with the Rust
version being slightly faster in many cases (and slower in some others).
I did spend more time trying to optimize this Rust version than I did
with the old C code. I initially tried a naive-ish conversion of the C
code to Rust, but that turned out to be much slower and I had to resort
to using regexes and different data structures fix that.
2017-01-15 12:17:34 +01:00