mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
parent
5aa280d949
commit
983e635192
@ -57,7 +57,7 @@ function css2json(css) {
|
|||||||
// 初始化返回值
|
// 初始化返回值
|
||||||
let json = {};
|
let json = {};
|
||||||
|
|
||||||
while (css.length > 0) {
|
while (css.length > 0 && (css.indexOf('{') !== -1) && (css.indexOf('}') !== -1)) {
|
||||||
// 存储第一个左/右花括号的下标
|
// 存储第一个左/右花括号的下标
|
||||||
const lbracket = css.indexOf('{');
|
const lbracket = css.indexOf('{');
|
||||||
const rbracket = css.indexOf('}');
|
const rbracket = css.indexOf('}');
|
||||||
|
Loading…
Reference in New Issue
Block a user