Skip to content

Latest commit

 

History

History
 
 

erb-parser

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@markuplint/erb-parser

npm version Build Status Coverage Status

Install

$ npm install -D @markuplint/erb-parser

$ yarn add -D @markuplint/erb-parser

Usage

Add parser option into your confugration file.

{
  "parser": {
    ".erb$": "@markuplint/erb-parser"
  }
}

Note

Unsupported the syntax that is complex on the attribute value.

✅ Available code:

<div attr="<%= value %>"></div>
<div attr='<%= value %>'></div>
<div attr="<%= value %>-<%= value2 %>-<%= value3 %>"></div>

❌ Unavailable code:

Didn't nest by quotations.

<div attr=<%= value %>></div>

Mixed the tags and spaces.

<div attr=" <%= value %> "></div>
<div attr="<%= value %> <%= value2 %>"></div>