lazyblorg
lazyblorg copied to clipboard
implemented URL dictionary with complete error checking
Following our discussion in this thread, I created a pull request for the corresponding code changes. The only user-configuration would be the LINKDEFS_STRICT_CHECKING
constant set in both of the modified files.
I also had to change some regular expressions (and extend with new ones). I think I improved their robustness, because for instance having two link definitions on the same line/paragraph was not handled in some of the REGEXP.
In org parser, I create self.__entry_data.('linkdefs')
for each blog article with "#+LINK" entries. This data then populates, in htmlizer, the "dict_of_links" dictionary that is used to check whether a given [[tag][link]]
or [[tag]]
needs to be expanded. This happens in the functions sanitizing URLs.
These tag shortcuts should work in normal blog articles and bulleted lists. Other sections handed off to eg pypandoc (probably tables?) would need to be implemented separately, like I did for bulleted "list"s. I will certainly do that, but only whenever I need it.