Skip to content
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

Renderer Errors with filter pandoc-citeproc in clean directory #28

Closed
undefinedMethod opened this issue Feb 7, 2019 · 3 comments
Closed

Comments

@undefinedMethod
Copy link

pandoc renderer errors if used with pandoc-citeproc on clean directory

if pandoc renderer is run on hexo generate without filter pages render then render citations if pandoc-citeproc is added to filters in config.yml

The plugin then errors if the directory is cleaned with hexo clean cmd and run again.

Error: pandoc-citeproc: reference undefinedmethod not found
pandoc-citeproc: reference undefinedmethod not found

@Ritsuka314
Copy link
Collaborator

Ritsuka314 commented Feb 8, 2019

I believe the issue is not related to hexo clean.

I think what happened to @undefinedMethod is that pandoc warned when certain references are not defined, in which case pandoc simply proceeded and generated the following

<span class="citation" data-cites="nonexistent">(<span class="citeproc-not-found" data-reference-id="nonexistent"><strong>???</strong></span>)</span>

which is rendered as (???).

What went wrong is in this plugin we capture everything from stderr and blocked hexo if there is anything.

This has caused issue before: #26

What I think we need is a way to separate warnings from actual issues. Sad thing is, since stderr is more like standard non-output, it is not easy. I will investigate this. One obvious way is pass --quiet to pandoc to suppress all warnings, but I do not like it. I am currently thinking about determining presence of error from pandoc return code, and then simply display all warnings and proceed if no error. I would like to confirm that pandoc uses return code consistently.

Also, while I am writing this, the issue is closed by the original reporter. May I ask why this issue is no longer a concern? I can certainly reopen this issue.

@undefinedMethod
Copy link
Author

undefinedMethod commented Feb 8, 2019

@RichardYan314 My apologies,

It appears that a twitter link using the @ symbol was being misread by pandoc-citeproc as a citation link, When I reformatted that link the issue was resolved.

@Ritsuka314
Copy link
Collaborator

@undefinedMethod Good to hear that your particular issue has been resolved. But still, you exposed one potential issue that when a reference item is undefined, or more generally, when pandoc sends a warning, this plugin blocks hexo. I will open a separate issue so you will not be bothered by GH notifications. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants