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

Change method of saving MatLab built-in keywords #1300

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Aug 9, 2019

To avoid instantiating a large number of strings, Rouge currently saves the list of built-in keywords for MatLab to a file that is only read when the MatLab lexer is in use. The keywords that are in this file are generated by a Rake task that extracts the keywords from the official MatLab documentation.

Since the time that the Rake task was created, MathWorks (the creators of MatLab) have changed the way this page works such that it requires JavaScript to load. This breaks the Rake task.

As an alternative, this PR includes the list of built-in keywords in a YAML file. This is consistent with some of the other lexers that have a large number of keywords (e.g. Apache lexer).

@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Aug 9, 2019
@pyrmont pyrmont merged commit 59624c1 into rouge-ruby:master Aug 19, 2019
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Aug 19, 2019
@pyrmont pyrmont deleted the bugfix.matlab-keywords-rake-task branch January 8, 2020 20:08
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.

None yet

1 participant