modern_perl_book icon indicating copy to clipboard operation
modern_perl_book copied to clipboard

Change chp.regex to regex in all files

Open jaxford opened this issue 9 years ago • 2 comments

build_html.pl fails to create html files with this error:

Unknown link regex

Replacing chp.regex with regex in these files corrects the problem:

sections/autoload.pod sections/chapter_06.pod sections/implicit_ideas.pod sections/values.pod

jaxford avatar Oct 12 '15 05:10 jaxford

I just came here to submit a very similar PR. I'm guessing that somewhere in the code, the link references are constructed using (\w+) in a regex. So chp.regex is created as regex and you get the error that @jaxford mentioned above (regex is the name of a missing link reference).

I fixed it by changing chp.regex to chp_regex - but this fix works just as well.

davorg avatar Oct 22 '15 15:10 davorg

I should have seen this earlier. The problem is with the regex not being able to extract the complete link name as @davorg mention. I made a fix by using the start_L and end_L callbacks to get the position of the text having the link name.

sd43 avatar Oct 24 '15 09:10 sd43