fix(plain_text): partition is not distinguishing file extensions correctly #129
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.
At line 743 of _wikitext.py, it calls partition to separate the extension from the file name. However, in this case, if the file name contains '.', the extension cannot be obtained correctly.
For example, [[File:Julia set (C = 0.285, 0.01).jpg]] is not recognized as a file because the extension is separated by '285, 0.01).jpg', and this problem is solved simply by replacing partition with rpartition.