Fix/add compatibility with attr_list extension ids, classes#9
Fix/add compatibility with attr_list extension ids, classes#9flywire merged 7 commits intoflywire:major-refactorfrom
Conversation
…ion extension (don't overwrite id supplied from attr_list, and if present extend class)
…on id, classes to table content element (otherwise lost). this is not needed for image caption as, the attr_list for images is part of the image itself (this is not possible for tables by default)
…tag, this produced wrong html syntax (class in closing tag), and prevented applying a custom class)
|
Hi! Is this PR waiting on something? I was just considering adding something like this myself. This is a great plugin, and this functionality would be very helpful to allow for automatic in-text cross referencing. I'm sure many people would appreciate it. |
|
hm idk either, im using it from my branch for now - feel free todo the same. (install in pip through git source) https://github.com/hendrikp/caption/tree/new-config-options-match-skip |
|
Yep, me too. Thanks :) I hacked in some javascript to do automatic cross-referencing as well. It just replaces the Of course this would probably be better done in the actual plugin source rather than hacking the DOM after the fact, but I didn't want to figure out how it works for now. |
|
this is i think a more streamlined solution then #14 as its using the existing attrlist feature |
This fixes/adds the compatibility to supply custom anchor id, and class through the markdown text (through attr_list extension).
In regard to usage please see updated readme + unit tests.
Goal is to be able to be able to specify permalink / anchorid's to the resulting captions/elements in general through the attr_list extension. If no markdown
attr_listspecified the caption extension will still fallback to the previous id generation method.