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

Add support for Here-Documents for the Bash language #787

Merged
merged 3 commits into from
Oct 2, 2015

Conversation

zeitgeist87
Copy link
Collaborator

This patch adds support for Here-Documents for the Bash language.
A Here-Document should be highlighted as a multiline string
and looks like this:

cat << EOF
foo bar
EOF

I have also cleaned up the Bash language a little bit. I have put those changes into separate commits to make the review easier.

Moving the Bash language definition into a function environment
allows for local variables, which are necessary for future
changes.
@Golmote
Copy link
Contributor

Golmote commented Oct 2, 2015

Thank you for working on this.

Can you rename the test file from important_feature.test to shebang_feature.test?

This patch introduces a proper alias for the Bash-Shebang.
Additionally the variables are changed from the class "property"
to "variable". The tests also need to be updated.
This patch adds support for Here-Documents for the Bash language.
A Here-Document should be highlighted as a multiline string
and looks like this:

cat << EOF
foo bar
EOF
@zeitgeist87
Copy link
Collaborator Author

Can you rename the test file from important_feature.test to shebang_feature.test?

Sure, I just updated the PR.

@Golmote
Copy link
Contributor

Golmote commented Oct 2, 2015

Thanks!

Golmote added a commit that referenced this pull request Oct 2, 2015
Add support for Here-Documents for the Bash language
@Golmote Golmote merged commit b57a096 into PrismJS:gh-pages Oct 2, 2015
@sunknudsen
Copy link

@zeitgeist87

Thanks for this PR! Do you know how to fix here-document support in the shell-session language?

Currently, everything after cat is registered as the output.

here-document

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.

3 participants