justinmeiners / srcweave

A literate programming system for any language.
https://www.jmeiners.com/literate-programming/
GNU General Public License v2.0
78 stars 4 forks source link

Add escape @@{...} functionality #22

Closed eihli closed 1 year ago

eihli commented 1 year ago

I ran into an issue where the text "...@{...}..." inside of prose or code blocks would get treated as a reference to a code block when I didn't want it to.

In my case, I was just trying to define a regular expression.

Also adds support custom PREFIX for install so that you can install this in a user local directory.

I haven't spent any time considering the performance implications of the additional negative lookbehind and the regex-replace-all on each line.

justinmeiners commented 1 year ago

@eihli Thanks! will review this soon. Sorry you had to mess with the parser, that's the ugliest part!

justinmeiners commented 1 year ago

Looks great! Thanks again.