-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix corrupt attribute values on dynamically bound Vue props without q…
…uotes (#252) Co-authored-by: Shinigami92 <[email protected]>
- Loading branch information
1 parent
cb70ee9
commit ff0715c
Showing
9 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- const circleSize = 72; | ||
- const circleWidth = 7; | ||
div | ||
v-progress-circular( | ||
:color="getProgressColor(currentCapacity)", | ||
:size=circleSize, | ||
:value="capacityPercentage", | ||
:width=circleWidth | ||
) {{ currentCapacity }}/{{ maxCapacity }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { readFileSync } from 'fs'; | ||
import { resolve } from 'path'; | ||
import { format } from 'prettier'; | ||
import { plugin } from './../../../src/index'; | ||
|
||
describe('Issues', () => { | ||
test('should not quote pug variables assigned to Vue props', () => { | ||
const expected: string = readFileSync(resolve(__dirname, 'formatted.pug'), 'utf8'); | ||
const code: string = readFileSync(resolve(__dirname, 'unformatted.pug'), 'utf8'); | ||
const actual: string = format(code, { parser: 'pug', plugins: [plugin] }); | ||
|
||
expect(actual).toBe(expected); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- const circleSize = 72; | ||
- const circleWidth = 7; | ||
div | ||
v-progress-circular( | ||
:color="getProgressColor(currentCapacity)", | ||
:size=circleSize, | ||
:value='capacityPercentage', | ||
:width=circleWidth, | ||
) {{ currentCapacity }}/{{ maxCapacity }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters