Skip to content

Support for formatting SQL code blocks in Markdown #593

@michael-the1

Description

@michael-the1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions