Commit a2b96da
committed
fix(toml): Strip blank linkes before frontmatter
From the [RFC](https://rust-lang.github.io/rfcs/3503-frontmatter.html)
> When parsing Rust source, after stripping the shebang (#!), rustc will strip the frontmatter:
>
> - May include 0+ blank lines (whitespace + newline)
The question is what is a non-newline whitespace and what is a newline.
Looking at the [Reference](https://doc.rust-lang.org/reference/whitespace.html),
the answer is "unsure", particularly because the Rust language doesn't
generally try to distinguish them.
I kept things basic for now and we can revisit later.1 parent 229a5a2 commit a2b96da
1 file changed
+14
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
233 | 242 | | |
234 | 243 | | |
235 | 244 | | |
| |||
242 | 251 | | |
243 | 252 | | |
244 | 253 | | |
245 | | - | |
| 254 | + | |
246 | 255 | | |
247 | 256 | | |
248 | 257 | | |
| |||
438 | 447 | | |
439 | 448 | | |
440 | 449 | | |
441 | | - | |
442 | | - | |
| 450 | + | |
| 451 | + | |
443 | 452 | | |
444 | 453 | | |
445 | 454 | | |
| |||
0 commit comments