Possibly related to #4 - I've noticed that this plug in works fine on a markdown article (.md) but did not work for a restructured text (.rst) format. After some digging, I believe the reason is that the t@ prefix is causing the rst format of pelican to parse it as an email address, therefore causing the plug to fail.
In the absence of the embed-tweet plugin, here is how markdown pelican turned a sentence of t@moskov/status/1303835719157182465 into html:
<p>t#moskov/status/1303835719157182465</p>
And here is how the rst pelican turned the same sentence into html:
The markdown-turned html can be substituted by this plugin into a proper embedded tweet, whereas the rst-turned html can't (because RST pelican interpreted it as an email address).
Possibly related to #4 - I've noticed that this plug in works fine on a markdown article (
.md
) but did not work for a restructured text (.rst
) format. After some digging, I believe the reason is that thet@
prefix is causing the rst format of pelican to parse it as an email address, therefore causing the plug to fail.In the absence of the embed-tweet plugin, here is how markdown pelican turned a sentence of
t@moskov/status/1303835719157182465
into html:And here is how the rst pelican turned the same sentence into html:
The markdown-turned html can be substituted by this plugin into a proper embedded tweet, whereas the rst-turned html can't (because RST pelican interpreted it as an email address).
My fix was to change the
t@
prefix to something that RST will not interpret as email, liket#
: https://github.com/ikding/website/commit/7395b040cc746f1e9dffc6e3645ad6a594ddc5ff And after this change, this plug-in would work on RST articles in pelican correctly.