cmacmackin / markdown-include

Provides syntax for Python-Markdown which allows for the inclusion of the contents of other Markdown documents.
GNU General Public License v3.0
104 stars 41 forks source link

Extension can have infinite circular reference loop #5

Closed r0ckarong closed 1 year ago

r0ckarong commented 8 years ago

I accidentally set up a circular reference in my page structure that brought my machine to its knees. If you include a page in itself it will endlessly try to do so (as designed).

Now, if you have multiple users like I do that use includes to build documents how can I prevent them from creating circular references?

They might (and very likely will) include a page that unbeknownst to them includes the same page a few levels of include iterations down?

Can the extension check itself or over the "include tree" that it's parsing? If not can there be a debug message or something that tells me if this is happening?

cmacmackin commented 8 years ago

At present there isn't any such capability. It would be nice to add it, but I'll have to think a bit about how to do so.