wenkokke / unlit

Tool to convert literate code between styles or to code.
BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

Various improvements #1

Closed minad closed 7 years ago

minad commented 7 years ago
minad commented 7 years ago

Hi @pepijnkokke,

I just want to ask you if you are interested in these patches? Especially the error handling is important to make unlit pure and usable as a library.

Daniel

wenkokke commented 7 years ago

@minad: You're correcting some kinda of embarrassing mistakes I made in putting this up – e.g. absolute paths that only work on my system – so of course I'm happy to accept these patches. Thanks!

The overall architecture of unlit isn't... great... though – e.g. generating the String version from the Text one using sed is a bit dodgy, and trying to mix the logic for bird-tags and open/close tags didn't work all too well for me, so I'm not planning to work on this much more in the future – or if I do, I'll probably rewrite it from the ground up.

minad commented 7 years ago

Cool thx for merging. Actually I think it is quite ok.

Concerning the mixed logic for Bird and the other styles - you are probably right in that it complicates things and introduces bugs. Maybe one could just use a bit of a different routine depending on if the state machine is currently in Bird or between other delimiters.