mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-29 02:55:17 +02:00
In the Actions log viewer, a double-quoted URL renders with a stray extra `;` after it. Reported in `gitea/runner#1046` Remove the buggy AI slop `linkifyURLs` and use new approach to process URLs in text --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 lines
440 B
TypeScript
11 lines
440 B
TypeScript
import {findUrlAtPosition} from './utils.ts';
|
|
|
|
test('findUrlAtPosition', () => {
|
|
const doc = 'visit https://example.com for info';
|
|
expect(findUrlAtPosition(doc, 0)).toBeNull();
|
|
expect(findUrlAtPosition(doc, 6)).toEqual('https://example.com');
|
|
expect(findUrlAtPosition(doc, 15)).toEqual('https://example.com');
|
|
expect(findUrlAtPosition(doc, 24)).toEqual('https://example.com');
|
|
expect(findUrlAtPosition(doc, 25)).toBeNull();
|
|
});
|