Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

allow spaces between << and the heredoc token - #63

Closed
ulidtko wants to merge 1 commit into
atom:masterfrom
ulidtko:fix/space-breaks-heredoc-highlighting
Closed

ulidtko wants to merge 1 commit into
atom:masterfrom
ulidtko:fix/space-breaks-heredoc-highlighting

Conversation

@ulidtko

@ulidtko ulidtko commented Dec 26, 2016

Copy link
Copy Markdown

Hi @lee-dohm, please review

Before:

screenshot

After:

screenshot

@lee-dohm

lee-dohm commented Dec 26, 2016 •

Copy link
Copy Markdown
Contributor

Please edit the body to include the template and fill in the relevant details. One detail to include is why you only allow space characters instead of whitespace in general?

@ulidtko

ulidtko commented Dec 26, 2016

Copy link
Copy Markdown
Author

Well, primarily because HT, VT, FF, NBSP and all those other whitespace goodies Unicode has to offer are... very weird characters to use middle-line in a shell script. Even the Holy Tab (HT, U+0009) is a dubious choice to delimit a heredoc token.

I actually started with \s* at first, but that didn't work for some reason, — and as an afterthought, I figured that the breaking of syntax highlighting is in a sense useful as a pretty good signal that you'd better use a plain U+0020 space here. After all, this is a shell script. Bonus point: the <<- form of heredoc makes harsh distinction between tabs and spaces, so one would better be reminded of that.

Sorry about the template, it's pretty boring to fill out. This is a simple, mostly aesthetic change.

@lee-dohm

lee-dohm commented Dec 26, 2016 via email

Copy link
Copy Markdown
Contributor

@winstliu

Copy link
Copy Markdown
Contributor

Superseded by #77. I tested and hard tabs do in fact work. Thanks for the contributions though @ulidtko!

@winstliu winstliu closed this Aug 22, 2017
@ulidtko
ulidtko deleted the fix/space-breaks-heredoc-highlighting branch August 22, 2017 15:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants