GNOME Bugzilla – Bug 312537
Bad syntax highlithing for python files
Last modified: 2005-08-07 21:11:10 UTC
Distribution/Version: ubuntu 5.04 After using this multi-line python comment in bluefish, all other highliting fails after this comment : [code] def cutDeck(self, area='random'): '''This cuts the deck in 2 and puts the first piece last. Possible area's: bottem = beginning of the deck (between card 1 and 26) middle = middle of the deck (between card 13 and 39) top = end of the deck (between card 27 and 52) random = could be everywhere Note : The bottom of the deck is the first card in the list! The top of the deck is the last card in the list!''' '''Find the cut-point''' if area == 'bottem': cut = random.randint(1, 26) elif area == 'middle': cut = random.randint(13, 39) elif area == 'top': cut = random.randint(26, 51) else: cut = random.randint(1, 52) [/code] It has problems with the following text : Possible area's Bluefish thinks the python comment ends after the ' of area's, but this isn't true. for python, the comment is over after : .... list!'''
did you come up with some new patterns already? Help can be found here: http://bluefish.openoffice.nl/manual/ch03s06.html#changing-highlighting-patterns if you have some better patterns, please attach them to this bug then we can add them to the default patterns.
Created attachment 50243 [details] proposal for new python highlighting patterns
I modified the highlighting-patterns within bluefish. - I raised the comment-pattern just above string-double - I made a new pattern based on the comment pattern : multi-line comment (begin and end tag : ''') - I placed this new pattern between comment and string-double in the list. It seems to work thit way I attached my ~/.bluefish/highlight file.
works like a charm, comitted to CVS, thanks!