Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Vale crashes with "Compile Error: unresolved reference 'words'" on Markdown with only heading and code block #697

@dholm

Description

@dholm

Check for existing issues

  • Completed

Environment

  • Linux
  • Direct download
  • vale version 2.28.3 to 2.29.2

Describe the bug / provide steps to reproduce it

Vale crashes when running it on a document with only a heading following by just a code block. Here is an example document that I used to reproduce the issue (replace <three-backticks> with three actual backticks since gfm doesn't like nesting code blocks):

# A section with only code

``` shell
ls
<three-backticks>

Vale terminates with the following message:

E201 Invalid value [/usr/share/vale/styles/Readability/FleschKincaid.yml:5:1]:

   4  
   5* formula: |
   6    (0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59
   7  

script run: Compile Error: unresolved reference 'words'
        at (main):1:46

Execution stopped with code 1.

This works on versions up to 2.28.2 and stopped working in 2.28.3.

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