From f45d2c199f853025524b15393cab9b5dcd45a955 Mon Sep 17 00:00:00 2001 From: yuanchuan Date: Sat, 25 Feb 2017 09:16:46 +0800 Subject: [PATCH] read the missing text value after loop --- css-doodle.js | 2 ++ src/tokenizer.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/css-doodle.js b/css-doodle.js index 2ce817e..947f7cd 100644 --- a/css-doodle.js +++ b/css-doodle.js @@ -386,6 +386,7 @@ function read_value(it) { } else if (/[;}]/.test(c)) { if (text.value.length) value.push(text); + text = struct.text(); break; } else if (c == '@') { @@ -398,6 +399,7 @@ function read_value(it) { } it.next(); } + if (text.value.length) value.push(text); return value; } diff --git a/src/tokenizer.js b/src/tokenizer.js index a5dd2b1..c0ff668 100644 --- a/src/tokenizer.js +++ b/src/tokenizer.js @@ -135,6 +135,7 @@ function read_value(it) { } else if (/[;}]/.test(c)) { if (text.value.length) value.push(text); + text = struct.text(); break; } else if (c == '@') { @@ -147,6 +148,7 @@ function read_value(it) { } it.next(); } + if (text.value.length) value.push(text); return value; }