1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 15:34:11 +01:00

Change /foo*/ to /foo*(?:)/ for vims sake

This commit is contained in:
Kris Maglione
2008-10-10 16:52:02 +00:00
parent c8f3e8f4e1
commit 9d6bd1f9e4

View File

@@ -51,8 +51,10 @@ liberator.template = {
case "boolean":
return <span class="hl-Boolean">{arg}</span>;
case "function":
// Vim generally doesn't like /foo*/, because */ looks like a comment terminator.
// Using /foo*(:?)/ instead.
if (processStrings)
return <span class="hl-Function">{String(arg).replace(/\{(.|\n)*/, "{ ... }")}</span>; /* } vim */
return <span class="hl-Function">{String(arg).replace(/\{(.|\n)*(?:)/, "{ ... }")}</span>;
return <>{arg}</>;
case "undefined":
return <span class="hl-Null">{arg}</span>;