sqlfmt icon indicating copy to clipboard operation
sqlfmt copied to clipboard

Support for formatting SQL code blocks in Markdown

Open michael-the1 opened this issue 9 months ago • 2 comments

It would be really nice if sqlfmt would support formatting SQL code blocks in Markdown files. In the context of dbt, this would also be very beneficial. We put a lot of example queries in our documentation and it would be amazing if they followed the same style.

Before

# Some title

Some text

```sql
SELECT * FROM some.table
```

After

# Some title

Some text

```sql
select * from some.table
```

In terms of requirements, I think limiting to sql blocks within .md files would be enough.

michael-the1 avatar May 24 '24 10:05 michael-the1