Skip to content

Conversation

@bam93
Copy link

@bam93 bam93 commented Mar 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant