mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-28 04:11:16 +01:00
Migrate to Vite+ unified toolchain (#428)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* oxlint-disable unbound-method */
|
||||
import process from 'node:process';
|
||||
|
||||
export function interceptStdout(intercept: (text: string) => string) {
|
||||
@@ -24,5 +25,5 @@ export function interceptStdout(intercept: (text: string) => string) {
|
||||
}
|
||||
|
||||
function interceptor(text: string, fn: (text: string) => string) {
|
||||
return fn(text).replace(/\n$/, '') + (fn(text) && /\n$/.test(text) ? '\n' : '');
|
||||
return fn(text).replace(/\n$/, '') + (fn(text) && text.endsWith('\n') ? '\n' : '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user