Gemini plugin is commenting out the SQL
Adminer version: 5.3.0 Compiled: single file Driver: MySQLi Database version: e.g. 10.2.12-MariaDB Plugins used: sql-gemini
I tried the SQL gemini plugin and it works great - very cool. The only problem I have that most of the time it returns the commented out SQL like this:
It's not 100% consistent, sometimes it will return the sql correctly stripped.
Looking into the code, if I replace this line:
https://github.com/vrana/adminer/blob/master/plugins/sql-gemini.php#L44
with this code (just switching the position of the closing \n and */:
$text = preg_replace('~(\n|^)```sql\n(.+)\n```(\n|$)~sU', "*/\n\n\\2\n\n/*", "/*\n$text\n*/");
the stripping works well for me. I can do the PR but I wanted to check first to make sure I understand this 100%.
~Also wanted to check with you whether you hardcoded the gemini key here on purpose: https://github.com/vrana/adminer/blob/master/plugins/sql-gemini.php#L19~
Nevermind - I read the comment.
Feel free to create a pull request.