-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 hello-document support in shell-session language #2503
Comments
@zeitgeist87 Perhaps you can help with this issue? |
@sunknudsen You mean like this, right? The problem is that our here doc strings assumed that there's nothing after the identifier. Is it correct to assume that every after the identifier (so e.g. |
@RunDevelopment I am fairly new to here documents, but my gut feeling is only This is how it is illustrated on Wikipedia (see https://en.wikipedia.org/wiki/Here_document) and how Visual Studio Code handles it in markdown codeblocks and shell scripts (coloring the delimiting identifier is a nice addition). |
Thank you for the clarification! I'll make a PR that fixes your issue. |
@RunDevelopment Amazing, thanks Michael! |
Information:
Does the latest version of Prism from the download page also have this issue?
yes
Description
First, thanks so much for Prism.
Putting together the regular expressions to pull this off must be painstaking!
Consider the following code block using the
shell-session
language.Issues:
Everything after
cat
is part of the output token. I believe the above code block should render three command tokens with no output.Lines that start with
#
(or$
) inside hello-documents become new commands. I believe commands inside of hello-documents should be ignored as they are part of a parent command.See following screenshot.
The text was updated successfully, but these errors were encountered: