Style SQL text in a monospace font
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 20 Aug 2024 01:06:07 +0000 (20:06 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 20 Aug 2024 01:06:07 +0000 (20:06 -0500)
src/pgwui_sql/static/pgwui_sql.css
src/pgwui_sql/views/sql.py

index a15376c86b48e261a509d9f02c875976ba8f29af..a7f9949c650ecd7640316a80cf992543ae1433aa 100644 (file)
@@ -22,8 +22,9 @@
  */
 
 /* The SQL entry window. */
-.sqltext { height: 40em;
-           width: 80em; }
+.sqltext { font-family: monospace; }
+textarea.sqltext { height: 40em;
+                   width: 80em; }
 
 /* The "status" message which goes with each SQL result (set) */
 .sql_status { font-size: 50%; }
index 04944696edf7c42ba0ac6f4f6542c637b9add73e..a68632d7782456d6a70c422079416356950e949c 100644 (file)
@@ -161,7 +161,7 @@ class SQLHandler(pgwui_core.core.SessionDBHandler):
         detail = '<br>\n'.join(detail)
 
         numbered_stmts = []
-        numbered_stmts.append('<br><ol>')
+        numbered_stmts.append('<br><ol class="sqltext">')
         for line in stmt_text.rstrip().split('\n'):
             numbered_stmts.append(f'<li>{markupsafe.escape(line)}</li>')
         numbered_stmts.append('</ol>')