justinmeiners / srcweave

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

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

Closed eihli closed 2 years ago

eihli commented 2 years 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 2 years ago

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

justinmeiners commented 2 years ago

Looks great! Thanks again.