Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nested one command code flow control #261

Merged
merged 58 commits into from
Nov 22, 2022

Conversation

kyklish
Copy link
Contributor

@kyklish kyklish commented Oct 28, 2022

Closes #255.

Fix bug in PR #260: continuation section in nested objects initialization.

This PR and PR #260 makes single-line comments jump +-1 indent. Revise single-line comments by explicitly aligning single-line comments to the next line of code after the main code has been formatted. In addition, this reduces possible formatting errors when we encounter blank lines or single-line comments in the file.

Extract oneCommandCode detection to util function nextLineIsOneCommandCode(...)

Notifying @mark-wiemer

@kyklish kyklish force-pushed the bug/nested-one-command-code branch from 57d2a8b to abf6292 Compare October 29, 2022 21:48
@kyklish kyklish force-pushed the bug/nested-one-command-code branch from 04f5968 to 8ec224f Compare November 1, 2022 19:22
@kyklish kyklish force-pushed the bug/nested-one-command-code branch from 8ec224f to 6c9823a Compare November 2, 2022 19:47
@kyklish kyklish force-pushed the bug/nested-one-command-code branch from b2038aa to ba3d900 Compare November 5, 2022 17:08
@kyklish kyklish force-pushed the bug/nested-one-command-code branch 2 times, most recently from edc22fe to e66be65 Compare November 13, 2022 08:17
@kyklish kyklish force-pushed the bug/nested-one-command-code branch from 686106f to 3249f8c Compare November 14, 2022 18:04
# Conflicts:
#	src/providers/formattingProvider.ts
#	src/providers/formattingProvider.utils.ts
…-code

# Conflicts:
#	src/providers/formattingProvider.ts
#	src/providers/formattingProvider.utils.ts
#	src/test/suite/format/samples/184-continuation-section.in.ahk
#	src/test/suite/format/samples/184-continuation-section.out.ahk
#	src/test/suite/format/samples/185-block-comment.in.ahk
#	src/test/suite/format/samples/185-block-comment.out.ahk
#	src/test/suite/format/samples/ahk-explorer.out.ahk
@kyklish kyklish marked this pull request as ready for review November 15, 2022 18:49
@mark-wiemer
Copy link
Owner

This is a big PR! I'll review it soon enough. My main goal right now is getting AHK+ updated to match AHK++ :)

@mark-wiemer mark-wiemer merged commit f766d2c into mark-wiemer:main Nov 22, 2022
@kyklish kyklish deleted the bug/nested-one-command-code branch November 22, 2022 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested one command code flow control + Workaround
2 participants