be9 / atom-ledger

Ledger 3 support for Atom
4 stars 1 forks source link

Currency codes are highlighted in unrelated words #1

Open beardicus opened 9 years ago

beardicus commented 9 years ago

As illustrated below:

ledger_highlight_example

Maybe make sure currency always has a space afterwards, and only a digit or space beforehand?

Thanks for the package!

be9 commented 9 years ago

@beardicus Haha, funny. The package is just a conversion from TextMate bundle, I didn't change syntax highlight rules much. I'll give a look to it.

be9 commented 9 years ago

@beardicus Can you show me the whole transaction in text? It seems that your date format isn't recognized correctly. What was that, 02/19/2015?

beardicus commented 9 years ago

Here's a screenshot of a few full transactions, plus the text copy/pasted.

screen shot 2015-03-02 at 9 20 49 am

01/19/2015 * MACHEISTBUNDLE
    ; MD5Sum: 25fa0a1a10def57feb7e61529891f09f
    ; CSV: Sale,01/19/2015,01/20/2015,"MACHEISTBUNDLE",-14.99
    Expenses:Unknown                                                 
    Assets:Bank:Current                                             $ -14.99

01/15/2015 * APL* ITUNES.COM/BILL
    ; MD5Sum: c51bf178813a62325ead4320e7d5c39b
    ; CSV: Sale,01/15/2015,01/16/2015,"APL* ITUNES.COM/BILL",-8.63
    Expenses:Unknown                                                 
    Assets:Bank:Current                                             $ -8.63

01/05/2015 * Spotify USA
    ; MD5Sum: 1b86a73566b114b408805196be1c9b8a
    ; CSV: Sale,01/05/2015,01/06/2015,"Spotify USA",-9.99
    Expenses:Unknown                                                 
    Assets:Bank:Current                                             $ -9.99
be9 commented 9 years ago

Just as I expected. The grammar doesn't understand 01/19/2015 as a date. You might use 2015/01/19 for now (just try to swap the year and you see the difference in highlighting) or wait until I fix the grammar.