Skip to content

Commit

Permalink
Fix: add escape for $
Browse files Browse the repository at this point in the history
  • Loading branch information
uga-rosa committed Dec 16, 2021
1 parent 117cf45 commit 3e219eb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion snippets/javascript/javascript.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ snippet sym
snippet ed
export default ${0}
snippet ${
${${1}}${0}
\${${1}}${0}
snippet as "async"
async ${0}
snippet aw "await"
Expand Down
12 changes: 6 additions & 6 deletions snippets/jsp.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ snippet cremove
snippet ccatch
<c:catch var="${0}" />
snippet cif
<c:if test="${${1}}">
<c:if test="\${${1}}">
${0}
</c:if>
snippet cchoose
<c:choose>
${0}
</c:choose>
snippet cwhen
<c:when test="${${1}}">
<c:when test="\${${1}}">
${0}
</c:when>
snippet cother
<c:otherwise>
${0}
</c:otherwise>
snippet cfore
<c:forEach items="${${1}}" var="${2}" varStatus="${3}">
<c:forEach items="\${${1}}" var="${2}" varStatus="${3}">
${0:<c:out value="$2" />}
</c:forEach>
snippet cfort
<c:set var="${1}">${2:item1,item2,item3}</c:set>
<c:forTokens var="${3}" items="${$1}" delims="${4:,}">
<c:forTokens var="${3}" items="\${$1}" delims="${4:,}">
${0:<c:out value="$3" />}
</c:forTokens>
snippet cparam
Expand All @@ -56,13 +56,13 @@ snippet cimport+
</c:import>
snippet curl
<c:url value="${1}" var="${2}" />
<a href="${$2}">${0}</a>
<a href="\${$2}">${0}</a>
snippet curl+
<c:url value="${1}" var="${2}">
<c:param name="${4}" value="${5}" />
cparam+${0}
</c:url>
<a href="${$2}">${3}</a>
<a href="\${$2}">${3}</a>
snippet credirect
<c:redirect url="${0}" />
snippet contains
Expand Down
2 changes: 1 addition & 1 deletion snippets/perl6.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ snippet ife
${3}
}
snippet eif
elsif ${1) {
elsif ${1} {
${2}
}
# Conditional One-line
Expand Down
2 changes: 1 addition & 1 deletion snippets/sh.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ snippet go
done
# Set SCRIPT_DIR variable to directory script is located.
snippet sdir
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPT_DIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
# getopt
snippet getopt
__ScriptVersion="${1:version}"
Expand Down

0 comments on commit 3e219eb

Please sign in to comment.