aidaan / bbedit-swift-language-module

A BBEdit/TextWrangler codeless language for Swift
MIT License
30 stars 8 forks source link

Issue: Syntax Color fails at second multi-line comment. #1

Open adaza opened 8 years ago

adaza commented 8 years ago

Thanks for putting together this package! I have had some strange experiences with it if there is more than one multi-line comment.

The failure is not consistent and things can change as you are editing comments

I have BBEdit 11.5 and OS X 10.10.5

Here is some test code

/* This code attempts to show bbedit-swift-language-module by aidaan 
 *  stops coloring properly at the second multi-line comment.
 *  Keywords in this comment are sometimes colored.        
 */

class SyntaxColorText {

    let thisProperty: Int
    let here = "Strings are properly colored."

    /*  Notice for keywords in the comments are colored.
     *  Sometimes when you edit the second comment, the 
     *  coloring fixes itself down to the next multi-line 
     *  comment.        
     */

    var butNow = "Strings are not" // Comments aren't colored

    init() {
        print("Constructing an instance")
        thisProperty = 55
        print("for thisProperty: \(thisProperty)")
    }
}`
whirlyNerd commented 7 years ago

It seems to be working just fine using this test text on OS X 10.11.6 and TextWrangler 5.5.2 (Mac App Store build 397016).

screen shot 2016-09-28 at 8 07 47 pm
bbezanson commented 7 years ago

I do not have this issue with OS X 10.12.2 and BBEdit 11.6.3. I am using a fixed version of the swift.plist file (see missing "<" issue reported in another bug report.