Skip to content

Commit c518073

Browse files
committed
fine tune
1 parent 11b9f62 commit c518073

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

web_src/js/features/comp/TextExpander.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ const debouncedSuggestIssues = debounce((key: string, text: string) => new Promi
1717
const ul = createElementFromAttrs('ul', {class: 'suggestions'});
1818
for (const issue of matches) {
1919
const li = createElementFromAttrs(
20-
'li',
21-
{role: 'option', class: 'tw-flex tw-gap-2', 'data-value': `${key}${issue.number}`},
20+
'li', {role: 'option', class: 'tw-flex tw-gap-2', 'data-value': `${key}${issue.number}`},
2221
createElementFromHTML(svg(getIssueIcon(issue), 16, ['text', getIssueColor(issue)])),
23-
createElementFromAttrs('span', null, String(issue.number)),
22+
createElementFromAttrs('span', null, `#${issue.number}`),
2423
createElementFromAttrs('span', null, issue.title),
2524
);
2625
ul.append(li);

web_src/js/utils/dom.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ test('createElementFromAttrs', () => {
1414
tabindex: 0,
1515
'data-foo': 'the-data',
1616
}, 'txt', createElementFromHTML('<span>inner</span>'));
17-
expect(el.outerHTML).toEqual('<button id="the-id" class="cls-1 cls-2" data-foo="the-data" disabled="" tabindex="0">txt<span>inner</span></button>');
17+
expect(el.outerHTML).toEqual('<button id="the-id" class="cls-1 cls-2" disabled="" tabindex="0" data-foo="the-data">txt<span>inner</span></button>');
1818
});

0 commit comments

Comments
 (0)