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(latexindent): regression in f2063898e9 #661

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tejada-Omar
Copy link

@Tejada-Omar Tejada-Omar commented Feb 23, 2025

When ran with the -l flag and no other filename (as is the case when passing the file through STDIN), latexindent interprets the argument to -l as the file to be formatted

Eg. latexindent -l=foo.yaml < bar.tex overwrites the current buffer with foo.yaml rather than the formatted bar.tex

This commit just appends the argument - so that STDIN is always used

See: f2063898e943893b20aeb30a324d5364ebaddff6 (#654)

Note: Issue can be replicated by passing the following option to setup:

formatters = {
	latexindent = {
		prepend_args = { "-l=foo.yaml" },
	},
},

The formatter will overwrite the buffer with the attempted formatting of foo.yaml if it exists, and just error out if it doesn't

When ran with the `-l` flag and no other filename (as is the case when
passing the file through STDIN), latexindent interprets the argument to
`-l` as the file to be formatted

Eg. `latexindent -l=foo.yaml < bar.tex` overwrites the current buffer
with `foo.yaml` rather than the formatted `bar.tex`

This commit just appends the argument `-` so that STDIN is always used

See: `f2063898e943893b20aeb30a324d5364ebaddff6` (stevearc#654)
@github-actions github-actions bot requested a review from stevearc February 23, 2025 01:15
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.

1 participant