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

Infinite loop / stuck for asciidoc #1001

Closed
SamyPesse opened this issue Jul 19, 2016 · 2 comments
Closed

Infinite loop / stuck for asciidoc #1001

SamyPesse opened this issue Jul 19, 2016 · 2 comments

Comments

@SamyPesse
Copy link

When trying to highlight this file (https://drive.google.com/open?id=0BysUdX0OApHyTm1xV0NvY2V5V00) with Asciidoc, it gets stuck in an infinite loop

Code used:

var grammar = Prism.languages.asciidoc;
Prism.tokenize(text, grammar);

It may be related to an encoding issue in the file since if I copy paste the content in a new file, the issue disappear.

@SamyPesse
Copy link
Author

It works if I normalize newlines with: text = text.replace(/\r\n/g, '\n');

@Golmote Golmote closed this as completed in 1a86d34 Sep 1, 2016
@Golmote
Copy link
Contributor

Golmote commented Sep 1, 2016

Hi! Thanks for reporting.

The issue should be fixed now. I managed to highlight your file. Feel free to reopen if not ;)

thesave added a commit to thesave/prism that referenced this issue Sep 2, 2016
* PrismJS/gh-pages:
  Autoloader plugin: don't try to load "none" component. Fix PrismJS#1000
  Optimized block regexps to prevent struggling on large files. Fixes
PrismJS#1001
  Revert PrismJS#998 + run normalize-whitespace and remove-initial-line-feed
plugins in the before-sanity-check hook. Fix PrismJS#1018 (see issue for
discussion)
  Run gulp

# Conflicts:
#	plugins/autoloader/prism-autoloader.min.js
mAAdhaTTah added a commit to mAAdhaTTah/prism that referenced this issue Oct 8, 2016
* gh-pages: (107 commits)
  Reverse prism markup min
  JSON: Fixed issues with properties and strings + added tests. Fix PrismJS#1025
  Fix grammar in Readme
  Update CHANGELOG
  Update APL minified file + update test for iota underbar function
  Add iota underbar (PrismJS#1024)
  Fix typo `Fload` to `Float` in prism-ruby.js (PrismJS#1023)
  Autoloader plugin: don't try to load "none" component. Fix PrismJS#1000
  Optimized block regexps to prevent struggling on large files. Fixes PrismJS#1001
  Revert PrismJS#998 + run normalize-whitespace and remove-initial-line-feed plugins in the before-sanity-check hook. Fix PrismJS#1018 (see issue for discussion)
  Run gulp
  Makes CSS strings greedy. Fix PrismJS#1013
  update min file and reverse core
  add prefix feature for custom class plugin
  Make doctype case insensetive (PrismJS#1009)
  Optimize images (PrismJS#1007)
  Restore `viewBox` to Prism logo (PrismJS#1002)
  Remove unneeded prefixed CSS (PrismJS#989)
  Fix WPD plugin's page
  Fix WPD at-rule detection + don't process if language is not handled + fix plugin's page
  ...

# Conflicts:
#	plugins/show-language/prism-show-language.css
#	plugins/show-language/prism-show-language.js
#	plugins/show-language/prism-show-language.min.js
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

No branches or pull requests

2 participants