mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
AdminerSqlGemini: Remove extra comments (fix #1075)
This commit is contained in:
@@ -41,8 +41,8 @@ class AdminerSqlGemini extends Adminer\Plugin {
|
|||||||
echo "-- " . $response->error->message;
|
echo "-- " . $response->error->message;
|
||||||
} else {
|
} else {
|
||||||
$text = $response->candidates[0]->content->parts[0]->text;
|
$text = $response->candidates[0]->content->parts[0]->text;
|
||||||
$text = preg_replace('~(\n|^)```sql\n(.+)\n```(\n|$)~sU', "*/\n\n\\2\n\n/*", "/*\n$text*/\n");
|
$text2 = preg_replace('~(\n|^)```sql\n(.+)\n```(\n|$)~sU', "*/\n\n\\2\n\n/*", "/*\n$text\n*/", -1, $count);
|
||||||
echo preg_replace('~/\*\s*\*/\n*~', '', $text);
|
echo ($count ? preg_replace('~/\*\s*\*/\n*~', '', $text2) : $text);
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user