Syntax highlighter does not recognise .F/.F90 files as Fortran

Reported by Patrick Farrell on 2011-05-11
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fluidity
Low
Unassigned
Launchpad itself
Low
Unassigned

Bug Description

Hi,

I am part of a team (fluidity-core) developing a scientific model in Fortran 90 on launchpad.

Launchpad uses pygments to do the syntax highlighting in its code browser, correct? Up until recently, pygments had a bug in it where .f/.f90 files were recognised as Fortran and highlighted as such, but .F/.F90 files were not. (The universal convention in the Fortran community is that .F/.F90 means it should be passed through the C preprocessor, but .f/.f90 should not.)

I reported this bug to pygments, and it has now been resolved in its trunk:
https://bitbucket.org/birkenfeld/pygments-main/issue/661/the-fortran-lexer-should-recognise-f-and

Would it be possible to incorporate this fix into the version of pygments that launchpad uses?

Thanks,

Patrick

Patrick Farrell (pefarrell) wrote :

Oh, I meant to give you a quick url where you can see the problem. Here is one file in a branch of mine:

http://bazaar.launchpad.net/~fluidity-core/fluidity/adjoint/view/head:/adjoint/Adjoint_Functional_Evaluation.F90

As you can see, the syntax highlighting is all wrong. I'm pretty sure that incorporating the patch at
https://bitbucket.org/birkenfeld/pygments-main/changeset/cfa0f44daad1

would fix this problem.

William Grant (wgrant) on 2011-05-11
Changed in launchpad:
status: New → Triaged
importance: Undecided → Low
tags: added: codebrowse
Changed in fluidity:
importance: Undecided → Low
status: New → Triaged

To fix this we need a new pygments release with the fix, then we can
bump our dependency to require it, put it through a test run and
deploy.

Patrick Farrell (pefarrell) wrote :

Great, that makes sense. According to
https://bitbucket.org/birkenfeld/pygments-main/src/cfa0f44daad1/CHANGES
version 1.5 will be released in July.

Tim Bond (timothy-bond) on 2011-11-25
Changed in fluidity:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers