Skip to content

3.22 regression - code/codeblocks in proximity to HTML tags gets treated as prose #1194

Closed

Description

@rainecheck

Check for existing issues

  • Completed

Environment

  • MacOS, Linux docker image
  • Homebrew, Mise
  • 3.22.

Describe the bug / provide steps to reproduce it

Given the below snippet:

<details>
  <summary>[`gItHuB` example][example] --- I am long, click me to expand</summary>
```hcl
    ..
    "foo": {
      "bar": [
        {
          "name": "a",
          "scm": {
            "branch": "ephem/a"
          },
          "k8s": {
            "account": "{{ $nonprodAccount }}",
            "manifestArtifactId": "dev-k8s-manifest",
            "imageArtifactIds": [
              "app"
            ]
          }
        },
        {
          "name": "b",
          "scm": {
            "branch": "ephem/b"
          },
          "k8s": {
            "account": "{{ $nonprodAccount }}",
            "manifestArtifactId": "test-k8s-manifest",
            "imageArtifactIds": [
              "app"
            ]
          }
        }
      ]
    }
    ..
```
</details>

The results:

 testfile.mdx
 2:14   error    Avoid using 'gItHuB'.                          Vale.Avoid    
 8:19   warning  Commas and periods go inside quotation marks.  Google.Quotes 
 9:12   error    Use 'SCM' instead of 'scm'.                    Vale.Terms    
 13:24  warning  Commas and periods go inside quotation marks.  Google.Quotes 
 13:29  error    Did you really mean 'nonprodAccount'?          Vale.Spelling 
 14:35  warning  Commas and periods go inside quotation marks.  Google.Quotes 
 21:19  warning  Commas and periods go inside quotation marks.  Google.Quotes 
 22:12  error    Use 'SCM' instead of 'scm'.                    Vale.Terms    
 26:24  warning  Commas and periods go inside quotation marks.  Google.Quotes 
 26:29  error    Did you really mean 'nonprodAccount'?          Vale.Spelling 
 27:35  warning  Commas and periods go inside quotation marks.  Google.Quotes 

Adding a single extra newline between the </summary> and the ```hcl:

<details>
  <summary>[`gItHuB` example][example] --- I am long, click me to expand</summary>

```hcl

changes the results:

vale testfile.mdx

 testfile.mdx
 2:14  error  Avoid using 'gItHuB'.  Vale.Avoid 

In order to get all inline code and codeblocks to be interpreted as such, they must be split onto separate lines:

<details>
<summary>
[`gItHuB` example][example] --- I am long, click me to expand
</summary>
```hcl

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions