diff --git a/src-tauri/yaak-plugins/src/plugin_handle.rs b/src-tauri/yaak-plugins/src/plugin_handle.rs index 95416b98..6525fc98 100644 --- a/src-tauri/yaak-plugins/src/plugin_handle.rs +++ b/src-tauri/yaak-plugins/src/plugin_handle.rs @@ -74,7 +74,6 @@ impl PluginHandle { } pub async fn set_boot_response(&self, resp: &BootResponse) { - info!("BOOTED PLUGIN {:?}", resp); let mut boot_resp = self.boot_resp.lock().await; *boot_resp = resp.clone(); } diff --git a/src-web/lib/contentType.ts b/src-web/lib/contentType.ts index c58a0fee..d3ffb740 100644 --- a/src-web/lib/contentType.ts +++ b/src-web/lib/contentType.ts @@ -25,14 +25,17 @@ function detectFromContent( ): EditorProps['language'] { if (content == null) return 'text'; - if (content.startsWith('{') || content.startsWith('[')) { + const firstBytes = content.slice(0, 20).trim(); + console.log("FIRST BYTES", firstBytes); + + if (firstBytes.startsWith('{') || firstBytes.startsWith('[')) { return 'json'; } else if ( - content.toLowerCase().startsWith('