|
|
|
|
@ -62,7 +62,13 @@ function get_hydrate_nodes(node, insert_text = false) {
|
|
|
|
|
if (data === '[') {
|
|
|
|
|
depth += 1;
|
|
|
|
|
will_start = true;
|
|
|
|
|
} else if (data === ']' && --depth === 0) {
|
|
|
|
|
} else if (data === ']') {
|
|
|
|
|
if (!started) {
|
|
|
|
|
// TODO get rid of this — it exists because each blocks are doubly wrapped
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (--depth === 0) {
|
|
|
|
|
if (insert_text && nodes.length === 0) {
|
|
|
|
|
var text = empty();
|
|
|
|
|
nodes.push(text);
|
|
|
|
|
@ -72,6 +78,7 @@ function get_hydrate_nodes(node, insert_text = false) {
|
|
|
|
|
return nodes;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (started) {
|
|
|
|
|
nodes.push(current_node);
|
|
|
|
|
|