dprint / dprint-plugin-markdown

Markdown code formatting plugin for dprint.
MIT License
29 stars 9 forks source link

Ignore file directive works in the whole file #43

Closed bartlomieju closed 3 years ago

bartlomieju commented 3 years ago

When working on a blog post @lucacasonato discovered that ignore directive for the file (in our case deno-fmt-ignore-file) makes dprint to ignore file if it's placed anywhere in the file.

Ideally this directive should only have effect if it's placed on the first line.

dsherret commented 3 years ago

@bartlomieju oops... looks like I forgot an ^ in the regex.

https://github.com/dprint/dprint-plugin-markdown/blob/5654ac9cb80343d7148f97a5f6667f1666fe3b90/src/parsing/utils.rs#L61

Will fix this later.

bartlomieju commented 3 years ago

No problem, thank you!