apache / apache/infrastructure-pelican

GFM reader may fail to be registered for markdown files

Open
#59 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
3
Forks
13
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.