router icon indicating copy to clipboard operation
router copied to clipboard

Overly persnickety validation of example router configs in docs

Open StephenBarlow opened this issue 2 years ago • 3 comments

Describe the bug See this comment.

StephenBarlow avatar Jul 07 '22 20:07 StephenBarlow

@StephenBarlow thanks for opening this!

We hacked around our helpful config validation in the case of the PR you referenced by adding a (literal) extra space in the codefence, but obviously that's not very intuitive or durable.

For a more fix-y fix, I'm curious if we just put some additional metadata on this line, like:


```yaml title="router.yaml" router-tests-skip-config-validation

... And updated our config validation searching regex to not match that case, would that break the world in other ways? In other words, will Gatsby or whatever parses that happily accept it as non-meaningful (to itself)?

abernix avatar Jul 08 '22 07:07 abernix

@trevorblades Can we add arbitrary metadata to the opening line of a codeblock as shown above? Or do we have special rules in place for the types of metadata we do allow (line highlight blocks, file title, etc.)

StephenBarlow avatar Jul 08 '22 19:07 StephenBarlow

Yup, we can add any metadata to code fences like the above 👍

trevorblades avatar Jul 08 '22 19:07 trevorblades