Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(IndexError): Handle unexpected System level pygments import #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PratikBhusal
Copy link

Description

Problem

If pygments is installed via pip (In my case pygments version 2.15), it will be used regardless of the locally shipped pygments dependency.

Solution

Defensively checks bounds to ensure no index exception occurs.

Checklist:

  • [x] I've read and understood the contribution guidelines
  • [x] I've tested my changes against at least one of the following Anki builds:
    • [x ] Latest standard Anki 2.1 binary build [required for Anki-compatible 2.1 add-ons]
    • Latest alternative Anki 2.1 binary build
    • Latest Anki 2.0 binary build [required for Anki 2.0-compatible add-ons]
  • [x] I've tested my changes on at least one of the following platforms:
    • [x] Linux, version: Arch Linux
    • [x ] Windows, version: Windows 10
    • macOS, version:
  • My changes potentially affect non-desktop platforms, of which I've tested:
    • AnkiMobile, version:
    • AnkiDroid, version:
    • AnkiWeb

Problem:
If pygments is installed via pip, it will be used regardless of
the locally shipped pygments dependency.

Solution:
Defensively checks bounds to ensure no index exception occurs.
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