martinthomson / aasvg

Turn ASCII art into SVG
BSD 2-Clause "Simplified" License
70 stars 11 forks source link

unjoined points for /\ frame #7

Closed dkg closed 2 years ago

dkg commented 2 years ago

I took a subset of a diagram from RFC 9106 and tried to pass it through aasvg to see what it would produce.

this is the source:

    slice 0    slice 1    slice 2    slice 3
    ___/\___   ___/\___   ___/\___   ___/\___
   /        \ /        \ /        \ /        \
  +----------+----------+----------+----------+
  |          |          |          |          | > lane 0
  +----------+----------+----------+----------+

It generated this:

yyy

(png version uploaded because github is justifiably scared of hosting arbitrary svg files)

I would have expected the /\ parts to be connected to the neighboring lines, and to join together at the top vertex as well. Instead, both symbols are free-floating.

martinthomson commented 2 years ago

Thanks @dkg, I've fixed this by adding detection for this specific case. I'm not 100% confident that it hasn't changed other things; it's not my code originally and the testing is still a little lean. Let me know how this works out for you. Release forthcoming soon.