-
Notifications
You must be signed in to change notification settings - Fork 857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with simple_footnotes when footnote contains markup #1022
Comments
In practice, I simply commented this line |
Nobody? @justinmayer? |
@Naereen: I've never used this plugin. Perhaps consider looking at its modification history and reaching out to folks who have contributed to it. |
@justinmayer OK, sorry. @linevych, @stuartlangridge, @mattvonrocketstein, @lindzey and @johnmarkschofield: could one of you please check this issue and the proposed changed (in my fork, but I can do the same change here). |
Can you fork the main repo and make a pull request with this change? Happy to look at it then, when the fix would help everyone. |
Fix issue getpelican#1022
Hi @johnmarkschofield, thanks for the reply. See #1036. |
If the problem persist with the last version of this plugin, I propose to report it over there. Else, I guess we can close this issue. |
Hi @Naereen! Very sorry for the long delay in reviewing this. You wrote:
I added that text to a page and tested with Pelican 4.5.4 and Simple Footnotes 1.0.2, and I couldn't reproduce that error. If you can reproduce the problem reliably, please submit a PR to the Simple Footnotes repo with a test that fails on the current code, followed by a commit that makes that test pass. Thanks for understanding that we can't just merge changes without understanding how, where, and why the problem occurs! 😅 |
@kdeldycke @justinmayer hi, and thanks for your replies. |
Thanks! |
Oh drat, I still have issues with my other blog... I'm trying to find the Markdown code that gives the issue, but the issue is the same as two years ago:
|
I haven't found any special Markdown markup that makes the simple-footnotes plugin fails, any foonote with a link inside made my blog failing (with most recent version of the plugin). - L.append(getText(n))
+ L.append(getText(n, recursive=recursive)) diff --git a/plugins/simple_footnotes/simple_footnotes.py b/plugins/simple_footnotes/simple_footnotes.py
index dc3894f..40a5edc 100644
--- a/plugins/simple_footnotes/simple_footnotes.py
+++ b/plugins/simple_footnotes/simple_footnotes.py
@@ -19,7 +19,7 @@ def getText(node, recursive=False):
else:
if not recursive:
return None
- L.append(getText(n))
+ L.append(getText(n, recursive=recursive))
return u"".join(L) |
In this line,
None
should not be returned.pelican-plugins/simple_footnotes/simple_footnotes.py
Line 20 in 8d96866
For example, this example
this text[ref]with a footnote with [a link](http://example.com)[/ref]will fail
fails with the following (cryptic) message:The text was updated successfully, but these errors were encountered: