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

Bug #780992 reported by Patrick Farrell
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fluidity
Fix Released
Low
Unassigned
Launchpad itself
Triaged
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

Tags: codebrowse
Revision history for this message
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)
Changed in launchpad:
status: New → Triaged
importance: Undecided → Low
tags: added: codebrowse
Changed in fluidity:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 780992] Re: Syntax highlighter does not recognise .F/.F90 files as Fortran

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.

Revision history for this message
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)
Changed in fluidity:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.