Fix OpenCode TUI scroll regression
Revert the May 23 terminal perf restore path and cap retained newline-free TUI redraw output while keeping completed-line terminal read pagination.
This commit is contained in:
@@ -46,17 +46,6 @@ describe('sanitizeRepoIcon', () => {
|
||||
src: 'data:image/png;base64,aGVsbG8=',
|
||||
source: 'upload'
|
||||
})
|
||||
expect(
|
||||
sanitizeRepoIcon({
|
||||
type: 'image',
|
||||
src: 'data:image/svg+xml;base64,PHN2Zz48L3N2Zz4=',
|
||||
source: 'upload'
|
||||
})
|
||||
).toEqual({
|
||||
type: 'image',
|
||||
src: 'data:image/svg+xml;base64,PHN2Zz48L3N2Zz4=',
|
||||
source: 'upload'
|
||||
})
|
||||
})
|
||||
|
||||
it('keeps null as an explicit reset', () => {
|
||||
@@ -78,6 +67,13 @@ describe('sanitizeRepoIcon', () => {
|
||||
source: 'upload'
|
||||
})
|
||||
).toBeUndefined()
|
||||
expect(
|
||||
sanitizeRepoIcon({
|
||||
type: 'image',
|
||||
src: 'data:image/svg+xml;base64,PHN2Zz48L3N2Zz4=',
|
||||
source: 'upload'
|
||||
})
|
||||
).toBeUndefined()
|
||||
expect(
|
||||
sanitizeRepoIcon({
|
||||
type: 'image',
|
||||
@@ -85,19 +81,5 @@ describe('sanitizeRepoIcon', () => {
|
||||
source: 'github'
|
||||
})
|
||||
).toBeUndefined()
|
||||
expect(
|
||||
sanitizeRepoIcon({
|
||||
type: 'image',
|
||||
src: 'https://example.com/icon.png',
|
||||
source: 'favicon'
|
||||
})
|
||||
).toBeUndefined()
|
||||
expect(
|
||||
sanitizeRepoIcon({
|
||||
type: 'image',
|
||||
src: 'https://example.com/icon.png',
|
||||
source: 'upload'
|
||||
})
|
||||
).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -14,7 +14,7 @@ const isRepoIconImageSource = (value: string): value is RepoIconImageSource =>
|
||||
|
||||
function isSupportedImageSrc(src: string, source: RepoIconImageSource): boolean {
|
||||
if (source === 'upload') {
|
||||
return /^data:image\/(?:png|svg\+xml);base64,[A-Za-z0-9+/=\s]+$/i.test(src)
|
||||
return /^data:image\/png;base64,[A-Za-z0-9+/=\s]+$/i.test(src)
|
||||
}
|
||||
|
||||
let url: URL
|
||||
|
||||
Reference in New Issue
Block a user