Commit Graph

2 Commits (master)

Author SHA1 Message Date
Alexander Kachkaev a05fd118be Do not require space after markdown block language name (#4783)
https://github.com/prettier/prettier/pull/4153 made it possible to detect fenced code block language when it is followed by arguments (e.g. ` ```js {something=something} `). This PR makes it also possible to detect language in cases cases like ` ```js{something=something} ` (no space).

The reason for this change is that Atom highlights code blocks regardless of a space after the language name, which makes users wonder why the correctly detected code block is not being formatted:

<img width="324" alt="screen shot 2018-06-28 at 22 08 13" src="https://user-images.githubusercontent.com/608862/42060780-db11f5b6-7b1f-11e8-9f43-fe91843f7d89.png">

PR background: https://github.com/prettier/prettier/pull/4153#issuecomment-401174999
2018-07-02 08:22:56 +08:00
Ika 0c09e150ba
feat(markdown): support fenced codeblock lang followed by attributes (#4153)
* test: add tests

* feat(markdown): support fenced codeblock lang followed by attributes
ref: https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk

* refactor: set limit
2018-03-16 00:25:39 +08:00