From ba334cae71c1ac008cd382c65b03f8a4cc01fe90 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 4 Dec 2011 20:40:46 +0400 Subject: [PATCH] fix for broken paren matching in @keyframes rules --- demo/kitchen-sink/docs/css.css | 25 +++++++++++++++++++++++++ lib/ace/mode/css_highlight_rules.js | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/demo/kitchen-sink/docs/css.css b/demo/kitchen-sink/docs/css.css index 3bb89ff8..3e32ec1d 100644 --- a/demo/kitchen-sink/docs/css.css +++ b/demo/kitchen-sink/docs/css.css @@ -2,4 +2,29 @@ font-family: Monaco, "Courier New", monospace; font-size: 12px; cursor: text; +} + + + +.blinker { + animation-duration: 1s; + animation-name: blink; + animation-iteration-count: infinite; + nimation-direction: alternate; + animation-timing-function: linear; +} + +@keyframes blink { + 0% { + opacity: 0; + } + 40% { + opacity: 0; + } + 40.5% { + opacity: 1 + } + 100% { + opacity: 1 + } } \ No newline at end of file diff --git a/lib/ace/mode/css_highlight_rules.js b/lib/ace/mode/css_highlight_rules.js index 7780f44c..71139e0c 100644 --- a/lib/ace/mode/css_highlight_rules.js +++ b/lib/ace/mode/css_highlight_rules.js @@ -266,7 +266,7 @@ var CssHighlightRules = function() { next: "ruleset" }, { token: "string", - regex: "@media.*?{", + regex: "@.*?{", next: "media" },{ token: "keyword",