Skip to content

Conversation

@Shinigami92
Copy link
Member

@Shinigami92 Shinigami92 added type: bug Functionality that does not work as intended/expected framework: Vue Related to the framework Vue labels Feb 8, 2025
@Shinigami92 Shinigami92 self-assigned this Feb 8, 2025
@Shinigami92
Copy link
Member Author

@Ralac07 please review and tell me if you have other more complex test cases I can add

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 94.66% (🎯 90%)
🟰 ±0%
2682 / 2833
🟢 Statements 94.66% (🎯 90%)
🟰 ±0%
2682 / 2833
🟢 Functions 96.29% (🎯 90%)
🟰 ±0%
104 / 108
🟢 Branches 92.98% (🎯 90%)
⬆️ +0.02%
636 / 684
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/printer.ts 94.21%
🟰 ±0%
94.19%
⬆️ +0.03%
100%
🟰 ±0%
94.21%
🟰 ±0%
334-335, 371-372, 521-523, 535-544, 549-562, 610-646, 662-663, 701-702, 769-773, 1122-1123, 1216-1217, 1244, 1253-1254, 1545-1546, 1592-1593, 1919-1925, 1963-1968
Unchanged Files
src/doctype-shortcut-registry.ts 100% 100% 100% 100%
src/index.ts 93.18% 100% 71.42% 93.18% 79-81, 84-86
src/logger.ts 77.46% 90.9% 81.81% 77.46% 37-46, 93-94, 153-157
src/options/common.ts 100% 100% 100% 100%
src/options/constants.ts 100% 100% 100% 100%
src/options/converge.ts 100% 60% 100% 100%
src/options/index.ts 100% 100% 100% 100%
src/options/pug-attribute-separator.ts 89.74% 75% 100% 89.74% 52-55
src/options/pug-class-location.ts 100% 100% 100% 100%
src/options/pug-class-notation.ts 100% 100% 100% 100%
src/options/pug-closing-bracket-indent-depth.ts 100% 100% 100% 100%
src/options/pug-comment-preserve-spaces.ts 100% 100% 100% 100%
src/options/pug-explicit-div.ts 100% 100% 100% 100%
src/options/pug-framework.ts 100% 100% 100% 100%
src/options/pug-id-notation.ts 100% 100% 100% 100%
src/options/pug-preserve-attribute-brackets.ts 100% 100% 100% 100%
src/options/pug-preserve-whitespace.ts 100% 100% 100% 100%
src/options/pug-single-file-component-indentation.ts 100% 100% 100% 100%
src/options/pug-wrap-attributes.ts 100% 100% 100% 100%
src/options/types.ts 100% 100% 100% 100%
src/options/attribute-sorting/index.ts 100% 100% 100% 100%
src/options/attribute-sorting/utils.ts 95.69% 94.44% 100% 95.69% 82-83, 94-95
src/options/empty-attributes/index.ts 100% 100% 100% 100%
src/options/empty-attributes/types.ts 100% 100% 100% 100%
src/options/empty-attributes/utils.ts 100% 100% 100% 100%
src/utils/angular.ts 100% 100% 100% 100%
src/utils/common.ts 89.67% 86.11% 100% 89.67% 19-20, 27-28, 56-57, 258-259, 262-263, 269-272, 331-332
src/utils/script-mime-types.ts 87.5% 83.33% 100% 87.5% 42-43, 49-50
src/utils/svelte.ts 100% 100% 100% 100%
src/utils/vue.ts 100% 100% 100% 100%
Generated in workflow #598 for commit 56e62b0 by the Vitest Coverage Report Action

@Ralac07
Copy link

Ralac07 commented Feb 22, 2025

I just used the sample code on the pug website, tests should probably include those but I'm not really sure
https://pugjs.org/language/iteration.html
sorry for my delay in responding

@Shinigami92
Copy link
Member Author

I just used the sample code on the pug website, tests should probably include those but I'm not really sure pugjs.org/language/iteration.html sorry for my delay in responding

That's a really good one. But do you have any more cases from your real world? I'm asking because I would like to now if I only need to consider tag as a previous token, or if there is more.

this.previousToken?.type === 'tag' ? '' : this.computedIndent;

@Ralac07
Copy link

Ralac07 commented Feb 25, 2025

I don't use pug much, sorry.

@Shinigami92
Copy link
Member Author

So if I understood you correctly, you are not affected in production code by this?
If that's the case, I would set this right now to low prio on my task-list and await more feedback from other users and if they encounter this bug.
Because since the repo was started, this bug was never reported ^^

@Shinigami92
Copy link
Member Author

I got no feedback anymore

@Shinigami92 Shinigami92 closed this Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework: Vue Related to the framework Vue type: bug Functionality that does not work as intended/expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: adds unwanted space if pugSingleFileComponentIndentation is true

3 participants