Skip to content

Commit

Permalink
chore(search-pad): add index property to token
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Jun 3, 2024
1 parent 86274e4 commit e8d566b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions lib/features/search-pad/SearchPadProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Element } from '../../model/Types';
export type Token = {
matched?: string;
normal?: string;
index?: number;
};

export type SearchResult = {
Expand Down
10 changes: 5 additions & 5 deletions lib/features/search-pad/SearchProvider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ export class FooSearchProvider implements SearchProvider {
{
primaryTokens: [
{
matched: 'foo',
normal: 'foo'
normal: 'foo',
index: 0
},
{
matched: pattern,
normal: pattern
index: 'foo'.length
}
],
secondaryTokens: [
{
matched: 'bar',
normal: 'bar'
normal: 'bar',
index: 0
}
],
element: create('shape')
Expand Down

0 comments on commit e8d566b

Please sign in to comment.