Pull requests

#277 Merged
Repository
hoelzro
Branch
default
Repository
birkenfeld
Branch
default

Improvements to Perl 6 detector

Author
  1. Rob Hoelz
Reviewers
Description

analyse_text now more closely conforms to the Perl 6 specification, as well as being simpler all around. I've tried it on #945 and #946 without issue.

Comments (6)

  1. Georg Brandl repo owner

    Will you also have a look at the lexer itself and see if you can find out why it loops for the inputs from the mentioned issues? It's important for applications that pygments doesn't loop with any input for any lexer :)

    1. Rob Hoelz author

      I tried the lexer on the files attached to the issues you mentioned, and they worked fine. Perhaps I could limit it to the first N lines?

      1. Georg Brandl repo owner

        Did you try the lexer, or the analyser? :)

        Even if analyse_text now returns False for these files, the lexer should still not loop when (mistakenly) pointed at them.

  2. Rob Hoelz author

    Georg Brandl I've fixed the lexer looping problem, made the text analyser friendlier to other languages, and I even fixed a highlighting bug. New commits for you in the request!

    Also, I looked over my commits, and noticed a bunch of commits whose contents are pretty much discarded right away (the analysis heuristic stuff). I get the impression that Hg users prefer not to mess with history once it's been written, but I thought I would get your opinion. Would you like me to clean the commits (or code) up in any way?