implemented URL dictionary with complete error checking #108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.