SQLite Forum

Support for Markdown formatted table output from a query
Login
Testing [5865d2f2d](https://www.sqlite.org/src/info/5865d2f2d0333024)... WOW!

```
sqlite> .mode markdown
sqlite> select * from event limit 2;
| type |      mtime       | objid | tagid | uid | bgcolor | euser | user | ecomment |        comment         | brief |      omtime      |
|------|------------------|-------|-------|-----|---------|-------|------|----------|------------------------|-------|------------------|
| ci   | 2454303.0902662  | 1     |       |     |         |       | drh  |          | initial empty baseline |       | 2454303.0902662  |
| ci   | 2454304.00006944 | 181   |       |     |         |       | drh  |          | Setup webpag updates.  |       | 2454304.00006944 |
```

It's so nice to read results in CLI, I'd make it my default `.mode`!

The Markdown table rendering in Fossil is a different question, but the table above appears cleanly in GitHub.

Speaking of escaping any characters in strings: on GitHub it appears that only **pipe** needs escaping. Stray brackets, backticks, asterisks, quotes are properly shown as characters; when balanced, they are rendered accordingly to Markdown.

WOW!