i_inline = false;
}
- var indentstr = i_inline || this.in_pre ? '' : this.indentstr;
+ var indentstr = this.indentstr;
// e_inline = elements that can be inline, but still allow \n before and after?
// only 'BR' ??? any others?
- var e_inline = name == 'BR' ? false : this.in_inline;
// ADD LINE BEFORE tage
if (!this.in_pre) {
if (in_inline) {
//code
- if (is_br) {
+ if (name == 'BR') {
this.addLine();
} else if (this.lastElementEndsWS()) {
this.addLine();
+ } else{
+ // otherwise - no new line. (and dont indent.)
+
+ indentstr = '';
}
- // otherwise - no new line.
+
} else {
this.addLine();
}
+ } else {
+ indentstr = '';
}
this.html.push(indentstr + '<', name.toLowerCase());