GitHub

Original file line numberDiff line numberDiff line change

@@ -10,7 +10,7 @@ extra-deps:

1010

- aeson-2.2.1.0

1111

- airgql-0.7.1.2

1212

- double-x-encoding-1.2.1

13-

- fuzzily-0.2.0.0

13+

- fuzzily-0.2.1.0

1414

- graphql-spice-1.0.2.0

1515
1616

- github: Airsequel/simple-sql-parser

Original file line numberDiff line numberDiff line change

@@ -26,12 +26,12 @@ packages:

2626

original:

2727

hackage: double-x-encoding-1.2.1

2828

- completed:

29-

hackage: fuzzily-0.2.0.0@sha256:72f456227a467ebbf9ecd4b052a594127ec1b6d1ac7a0fca5d4d3bfd7fb96410,1796

29+

hackage: fuzzily-0.2.1.0@sha256:dfb7cc0083a42cc0460e23d2205724cd47c4ef58cac1d2edd8f51ac0284e36f2,1796

3030

pantry-tree:

31-

sha256: 39e897ab6b8b3d660dc6033d9d4f7eaa2c4bcede7caf80e76dd0770cd0aef8ce

31+

sha256: dbd60f4c54ace13de6f7bcfff9949d5cbccdbe3b47731bc411ae116f1f92b119

3232

size: 319

3333

original:

34-

hackage: fuzzily-0.2.0.0

34+

hackage: fuzzily-0.2.1.0

3535

- completed:

3636

hackage: graphql-spice-1.0.2.0@sha256:97d22da8ec38342408bcd237e91e76ffcdad4f14df666f62b0b1ccba6bf39b87,2000

3737

pantry-tree:

Original file line numberDiff line numberDiff line change

@@ -1683,8 +1683,10 @@ findTask connection aPattern = do

16831683

let

16841684

ulidWidth = 5

16851685

numOfResults = 8

1686-

minimumScore = 4

1686+

minimumScore = 5

16871687

ulidColor = Green

1688+

-- TODO: Escape sequences are counted as several chars and mess up wrapping.

1689+

-- Implement first: https://github.com/ad-si/Fuzzily/issues/1

16881690

preTag = "\x1b[4m\x1b[34m" -- Set color to blue and underline text

16891691

postTag = "\x1b[0m" -- Reset styling

16901692

metaNorm metadata =

@@ -1705,7 +1707,20 @@ findTask connection aPattern = do

17051707

scoreFunc (ulid, theBody, _, mbNotes, mbMetadata) =

17061708

let

17071709

scoreParts =

1708-

[ matchFunc theBody

1710+

[ ( matchFunc theBody

1711+

-- Weight the body score higher

1712+

<&> \case

1713+

Fuzzily.Fuzzy{score, ..} ->

1714+

Fuzzily.Fuzzy{score = score + 1, ..}

1715+

)

1716+

-- Always include the body

1717+

<|> ( Just $

1718+

Fuzzily.Fuzzy

1719+

{ original = theBody

1720+

, rendered = theBody

1721+

, score = 0

1722+

}

1723+

)

17091724

, matchFunc (maybe "" unwords mbNotes)

17101725

, -- TODO: Find good way to include tags

17111726

-- , matchFunc (maybe "" unwords mbTags)

Read the original on github.com ↗