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

Batch files: support uppercase REM and @REM #313

Closed
eykamp opened this issue Feb 3, 2022 · 4 comments
Closed

Batch files: support uppercase REM and @REM #313

eykamp opened this issue Feb 3, 2022 · 4 comments

Comments

@eykamp
Copy link

eykamp commented Feb 3, 2022

I'd like to know if it would be possible to add support for Windows Batch files. It seems pretty straightforward... comments begin with "REM " or "@Rem ", and there are no block comments. If there is a way I can configure this myself, that would make me happy enough.

Thanks!

@stkb
Copy link
Owner

stkb commented Feb 4, 2022

Hi, .bat and .cmd support is already in there but I just found that it has some bugs. It currently supports "rem" (lowercase) or "::" for comments. I need to fix it so it's case insensitive and supports the optional "@" too. That's easily done so a fix will be coming soon.

@eykamp
Copy link
Author

eykamp commented Feb 4, 2022

I am observing that behavior too. Thanks for your quick response!

It's less of an issue for me, but it also seems to be missing from the list of content types on the docs page: https://stkb.github.io/Rewrap/specs/content-types

stkb added a commit that referenced this issue Feb 6, 2022
@stkb
Copy link
Owner

stkb commented Feb 6, 2022

This should now work in pre-release version 17.5.

Yeah that list of content types isn't exhaustive. In the beginning I added tests for every file type supported, but now I only add types that have some sort of special behavior to them. However I've now added tests for batch files :)

@stkb stkb added the in pre-release version Is in pre-release version but not in stable yet label Feb 6, 2022
@stkb stkb changed the title Possible to add support for Batch (Windows .bat, .cmd) files? Batch files: support uppercase REM and @REM Feb 6, 2022
stkb added a commit that referenced this issue Feb 14, 2022
stkb added a commit that referenced this issue Feb 14, 2022
- Support .rmd files as markdown (#245)
- Basic support for Textile files as markdown (#271)
- Support FIDL (#255), Pascal/Delphi (#97) & pylintrc files (#121)
- Shell script: Ignore shebangs (#129)
- Add '//'-comments to CSS (workaround for #309)
- Fix batch files: case-insensitive "REM" and "@" prefix (#313)
- Fix the document being 'modified' if there were no actual changes
  (#308, #315)
@stkb
Copy link
Owner

stkb commented Feb 14, 2022

Now fixed in v1.16.2

@stkb stkb closed this as completed Feb 14, 2022
@stkb stkb removed the in pre-release version Is in pre-release version but not in stable yet label Feb 14, 2022
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

No branches or pull requests

2 participants