Add syntax highlighting for Lasso (BB-5266)

Issue #4558 closed
Eric Knibbe created an issue

Not sure if you use the most recent build of Pygments or just the last release, but highlighting for Lasso was recently added to it, and it'd be great if Lasso syntax highlighting was added to Bitbucket as well.

Comments (12)

  1. Charles McLaughlin

    Currently we're running the 1.6-rc1 release of Pygments. We'll try the final 1.6 on our staging instance and hopefully upgrade production soon.

  2. Eric Knibbe reporter

    They don't need to; .inc is a valid file extension for Lasso. Browse around that repo for examples of .inc files which highlight without issue.

  3. Erik van Zijst

    I've tested with Pygments 1.6 and I see no difference in the rendering of those files. They still highlight the same way.

    A quick glance over the Pygments sources doesn't seem to show .inc being mapped to lasso though. Now Pygments should do a reasonable job autodetecting the language, but it could well get it wrong.

    Can you show where our highlighting is off and more importantly, can you upload the very test files under filenames that end in .lasso to see if that gives you the expected result?

  4. Eric Knibbe reporter

    See Pygments' lexers/web.py, in which .inc (and .incl and .las) are mapped as alias_filenames for Lasso. I don't believe it's a case of Bitbucket not recognizing the .inc extension, though, because other .inc files in the same repo highlight just fine. This I can't reproduce with pygmentize; e.g. pygmentize -g lspec.spec.inc (highlight the file based on its contents) consistently returns the file's contents unhighlighted. This leads me to believe that Bitbucket's language detection is slightly more involved than just using what Pygments suggests.

  5. Atlassian Bitbucket

    This issue has been closed due to inactivity. If you continue to see problems, please reopen or create a new issue.

  6. Log in to comment