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

GFM reader may fail to be registered for markdown files #59

Open
sebbASF opened this issue Jun 11, 2023 · 1 comment · May be fixed by #60
Open

GFM reader may fail to be registered for markdown files #59

sebbASF opened this issue Jun 11, 2023 · 1 comment · May be fixed by #60
Labels
bug Something isn't working

Comments

@sebbASF
Copy link
Contributor

sebbASF commented Jun 11, 2023

Pelican looks for readers by scanning BaseReader.subclasses(). The last one in the list wins.
There is no warning if an extension has multiple readers.

It looks like the gfm reader is currently located after the built-in MarkdownReader, but that may not always be the case.

If the wrong reader is used, this may cause hard to find issues (especially if the ordering depends on the context!).

It should be easy enough to use the readers_init signal to check which reader is being used for Markdown files, and log an error if it is not GFM.

@sebbASF sebbASF added the bug Something isn't working label Jun 11, 2023
sebbASF added a commit that referenced this issue Jun 11, 2023
@sebbASF
Copy link
Contributor Author

sebbASF commented Jun 11, 2023

Turns out that the code already updates the class for the 'md' extension, but fails to do so for 'mkd' etc.

@sebbASF sebbASF linked a pull request Jun 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant