Unexpected infinite loop when calling a simple function

I’m trying to create a function that calls another function.

using Weave

function knytte( file_name, doc_type )
    weave( file_name, doctype = doc_type )
end

knytte( "test.jmd", "md2html" )

The content of “test.jmd” could be anything.

Somehow julia just kept executing the weave() function over and over.

Does someone have an idea how the code needs to be changed?

Thanks!

I just tried running exactly your code with test.jmd containing just:

#hello world

and it ran correctly. I also don’t see anything obviously wrong with the code you’ve written.

Can you post the simplest possible test.jmd that reproduces the issue for you?

4 Likes

Thank you!

I made a mistake in the julia markdown file. I was calling the knytte() function to the julia markdown file, in the julia markdown file. This created the infinite loop!

1 Like