Skip to content

Commit

Permalink
Change Markdown syntax highlighting language to "pug"
Browse files Browse the repository at this point in the history
```pug
pre.
  \o/
   |
  / \
```
  • Loading branch information
TimothyGu committed Jun 4, 2016
1 parent b99d9fb commit 2ef8920
Show file tree
Hide file tree
Showing 36 changed files with 80 additions and 80 deletions.
80 changes: 40 additions & 40 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pug must not contain any attribute concatenation.

```jade
```pug
//- Invalid
a(href='text ' + title) Link
```
Expand All @@ -11,7 +11,7 @@ a(href='text ' + title) Link

Pug must not contain any attribute interpolation operators.

```jade
```pug
//- Invalid
a(href='text #{title}') Link
```
Expand All @@ -20,7 +20,7 @@ a(href='text #{title}') Link

Pug must not contain any block expansion operators.

```jade
```pug
//- Invalid
p: strong text
table: tr: td text
Expand All @@ -30,7 +30,7 @@ table: tr: td text

Prefer class literals over `class` attributes with static values.

```jade
```pug
//- Invalid
span(class='foo')
Expand All @@ -42,7 +42,7 @@ span.foo

All attribute blocks must be written before any class literals.

```jade
```pug
//- Invalid
input.class(type='text')
Expand All @@ -54,7 +54,7 @@ input(type='text').class

All ID literals must be written before any class literals.

```jade
```pug
//- Invalid
input.class#id(type='text')
Expand All @@ -66,7 +66,7 @@ input#id.class(type='text')

Pug must not contain any class literals.

```jade
```pug
//- Invalid
.class
Expand All @@ -79,7 +79,7 @@ div(class='class')
Attribute blocks must not contain any duplicates.
And if an ID literal is present an ID attribute must not be used. Ignores class attributes.

```jade
```pug
//- Invalid
div(a='a' a='b')
#id(id='id')
Expand All @@ -93,7 +93,7 @@ div(class='a', class='b')

Pug must not contain any HTML text.

```jade
```pug
//- Invalid
<strong>html text</strong>
p this is <strong>html</strong> text
Expand All @@ -103,7 +103,7 @@ p this is <strong>html</strong> text

Prefer ID literals over `id` attributes with static values.

```jade
```pug
//- Invalid
span(id='foo')
Expand All @@ -115,7 +115,7 @@ span#id

All attribute blocks must be written before any ID literals.

```jade
```pug
//- Invalid
input#id(type='text')
Expand All @@ -127,7 +127,7 @@ input(type='text')#id

Pug must not contain any ID literals.

```jade
```pug
//- Invalid
#id
Expand All @@ -139,7 +139,7 @@ div(id='id')

Pug must not contain multiple blank lines in a row.

```jade
```pug
//- Invalid
div
Expand All @@ -158,7 +158,7 @@ div

No code operators (`-`/`=`/`!=`) should be followed by any spaces.

```jade
```pug
//- Invalid
p= 'This code is <escaped>'
p!= 'This code is <strong>not</strong> escaped'
Expand All @@ -172,7 +172,7 @@ p!='This code is <strong>not</strong> escaped'

No unbuffered code operators (`-`) should be followed by any spaces.

```jade
```pug
//- Invalid
- var a = 'This is code'
Expand All @@ -184,7 +184,7 @@ No unbuffered code operators (`-`) should be followed by any spaces.

Disallows space after opening attribute bracket and before closing.

```jade
```pug
//- Invalid
input( type='text' name='name' value='value' )
Expand All @@ -198,7 +198,7 @@ input(type='text' name='name' value='value')

Pug must not contain any of the attributes specified.

```jade
```pug
//- Invalid
span(a='a')
div(B='b')
Expand All @@ -208,7 +208,7 @@ div(B='b')

`img` tags must not contain any of the attributes specified.

```jade
```pug
//- Invalid
img(title='title')
```
Expand All @@ -219,7 +219,7 @@ Pug must not contain any of the tags specified.

## e.g.: `[ "b", "i" ]`

```jade
```pug
//- Invalid
b Bold text
i Italic text
Expand All @@ -229,7 +229,7 @@ i Italic text

Pug must not contain any string concatenation.

```jade
```pug
//- Invalid
h1= title + \'text\'
```
Expand All @@ -238,7 +238,7 @@ h1= title + \'text\'

Pug must not contain any string interpolation operators.

```jade
```pug
//- Invalid
h1 #{title} text
```
Expand All @@ -247,7 +247,7 @@ h1 #{title} text

Pug must not contain any tag interpolation operators.

```jade
```pug
//- Invalid
| #[strong html] text
p #[strong html] text
Expand All @@ -261,7 +261,7 @@ Pug files should be at most the number of lines specified.

All class literals must be written before any attribute blocks.

```jade
```pug
//- Invalid
input(type='text').class
Expand All @@ -273,7 +273,7 @@ input.class(type='text')

All class literals must be written before any ID literals.

```jade
```pug
//- Invalid
input#id.class(type='text')
Expand All @@ -285,7 +285,7 @@ input.class#id(type='text')

All ID literals must be written before any attribute blocks.

```jade
```pug
//- Invalid
input(type='text')#id
Expand All @@ -301,7 +301,7 @@ All files must end with a line feed.

All attributes must be written in lower case. Files with `doctype xml` are ignored.

```jade
```pug
//- Invalid
div(Class='class')
Expand All @@ -313,7 +313,7 @@ div(class='class')

All tags must be written in lower case. Files with `doctype xml` are ignored.

```jade
```pug
//- Invalid
Div(class='class')
Expand All @@ -327,7 +327,7 @@ div(class='class')

All code operators (`-`/`=`/`!=`) must be immediately followed by a single space.

```jade
```pug
//- Invalid
p='This code is <escaped>'
p!= 'This code is <strong>not</strong> escaped'
Expand All @@ -341,7 +341,7 @@ p!= 'This code is <strong>not</strong> escaped'

All unbuffered code operators (`-`) must be immediately followed by a single space.

```jade
```pug
//- Invalid
-var a = 'This is code'
Expand All @@ -353,7 +353,7 @@ All unbuffered code operators (`-`) must be immediately followed by a single spa

Requires space after opening attribute bracket and before closing.

```jade
```pug
//- Invalid
input(type='text' name='name' value='value')
Expand All @@ -367,7 +367,7 @@ input( type='text' name='name' value='value' )

`img` tags must contain all of the attributes specified.

```jade
```pug
//- Invalid
img(src='src')
Expand All @@ -379,7 +379,7 @@ img(src='src' alt='alt')

Requires the use of `===` and `!==` instead of `==` and `!=`.

```jade
```pug
//- Invalid
if true == false
if true != false
Expand All @@ -395,7 +395,7 @@ if true !== false

All attribute values must be enclosed in single quotes.

```jade
```pug
//- Invalid
input(type="text" name="name" value="value")
Expand All @@ -414,7 +414,7 @@ All attribute values must be enclosed in quote marks match the first quote mark
* All attributes must be immediately followed by a comma and then a space.
* All attributes must be on the same line.

```jade
```pug
//- Invalid
input(type='text' name='name' value='value')
div
Expand All @@ -432,7 +432,7 @@ input(type='text', name='name', value='value')
* All attributes that are on the same line must be immediately followed by a space.
* All attributes that are on different lines must be preceded by two spaces.

```jade
```pug
//- Invalid
input(type='text', name='name', value='value')
div
Expand All @@ -454,7 +454,7 @@ div

Checks that Pug does not contain any unnecessary `div` tags.

```jade
```pug
//- Invalid
div.class
div#id
Expand All @@ -472,7 +472,7 @@ div.class(class='class')

Indentation must be consistently two spaces.

```jade
```pug
//- Invalid
div
<TAB>div
Expand All @@ -486,7 +486,7 @@ div

Indentation must be consistently tabs.

```jade
```pug
//- Invalid
div
<SPACE><SPACE>div
Expand All @@ -502,7 +502,7 @@ div

All line break characters must match.

```jade
```pug
//- Invalid
div(class='class')<CRLF>
.button
Expand All @@ -518,7 +518,7 @@ Checks that Pug does not contain any
[unnecessary self closing tags](http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements).
Files with `doctype xml` are ignored.

```jade
```pug
//- Invalid
area/
link/
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/disallow-attribute-concatenation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// Pug must not contain any attribute concatenation.
//
// ```jade
// ```pug
// //- Invalid
// a(href='text ' + title) Link
// ```
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/disallow-attribute-interpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// Pug must not contain any attribute interpolation operators.
//
// ```jade
// ```pug
// //- Invalid
// a(href='text #{title}') Link
// ```
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/disallow-block-expansion.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// Pug must not contain any block expansion operators.
//
// ```jade
// ```pug
// //- Invalid
// p: strong text
// table: tr: td text
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/disallow-class-attribute-with-static-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// Prefer class literals over `class` attributes with static values.
//
// ```jade
// ```pug
// //- Invalid
// span(class='foo')
//
Expand Down

0 comments on commit 2ef8920

Please sign in to comment.