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

Unicode characters in CSS properties #1227

Merged
merged 6 commits into from
Nov 20, 2017
Merged

Unicode characters in CSS properties #1227

merged 6 commits into from
Nov 20, 2017

Conversation

valtlai
Copy link
Contributor

@valtlai valtlai commented Nov 20, 2017

Highlight Unicode characters in CSS properties correctly, for example .foo { --bär: 3 }.

Optimized the “function” regex in the JavaScript definition: replaced _a-zA-Z0-9 with \w, removed uppercase A-Z because the i flag is set.

Used that regex for CSS but removed $ and added -.

Highlight Unicode characters in CSS properties correctly, for example “.foo { --bär: 3 }”.

Optimized the “function” regex in the JavaScript definition: replaced “_a-zA-Z0-9” with “\w”, removed uppercase “A-Z” because the “i” flag is set.

Used that regex for CSS but removed “$” and added “-”.
@Golmote
Copy link
Contributor

Golmote commented Nov 20, 2017

Hi! Thanks for contributing. Could you run gulp to generate the minified versions (and the prism.js file) please?

Also, can you update the test file for CSS properties with an example using unicode characters, and make sure it passes? You can use npm test to run the tests.

@valtlai
Copy link
Contributor Author

valtlai commented Nov 20, 2017

Do I need to install Gulp and NPM, eh?

@valtlai
Copy link
Contributor Author

valtlai commented Nov 20, 2017

Added a test (and fixed indentation).

@Golmote
Copy link
Contributor

Golmote commented Nov 20, 2017

Do I need to install Gulp and NPM, eh?

Yes, indeed.

@valtlai
Copy link
Contributor Author

valtlai commented Nov 20, 2017

I have not use them ever. When I have installed both do I just cd to the local directory and run the commands?

@Golmote
Copy link
Contributor

Golmote commented Nov 20, 2017

You need to cd to the local directory and run npm install.
Once it's done, you should be able to run gulp and npm test.

@valtlai
Copy link
Contributor Author

valtlai commented Nov 20, 2017

Added minified versions, and tests passed.

@Golmote
Copy link
Contributor

Golmote commented Nov 20, 2017

Awesome thanks! Can you add the prism.js file to the PR? It should have been modified when you ran gulp.

@Golmote
Copy link
Contributor

Golmote commented Nov 20, 2017

Great! Looks good to me. Thanks again for contributing!

@Golmote Golmote merged commit f234ea4 into PrismJS:gh-pages Nov 20, 2017
@valtlai valtlai deleted the unicode branch November 20, 2017 21:36
Golmote pushed a commit that referenced this pull request Nov 21, 2017
In previous commit, #1227, a “function” regex JavaScript definition was updated. The same regex is used in few more points, and this PR optimizes them too.

Tests are ran and passed.
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

2 participants