mirror of https://github.com/adamdruppe/arsd.git
minor
This commit is contained in:
parent
b58e50dc23
commit
612aaed5eb
38
dom.d
38
dom.d
|
@ -2426,13 +2426,10 @@ class RawSource : SpecialElement {
|
||||||
string source;
|
string source;
|
||||||
}
|
}
|
||||||
|
|
||||||
///.
|
abstract class ServerSideCode : SpecialElement {
|
||||||
class PhpCode : SpecialElement {
|
this(Document _parentDocument, string type) {
|
||||||
///.
|
|
||||||
this(Document _parentDocument, string s) {
|
|
||||||
super(_parentDocument);
|
super(_parentDocument);
|
||||||
source = s;
|
tagName = "#" ~ type;
|
||||||
tagName = "#php";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///.
|
///.
|
||||||
|
@ -2454,30 +2451,21 @@ class PhpCode : SpecialElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
///.
|
///.
|
||||||
class AspCode : SpecialElement {
|
class PhpCode : ServerSideCode {
|
||||||
///.
|
///.
|
||||||
this(Document _parentDocument, string s) {
|
this(Document _parentDocument, string s) {
|
||||||
super(_parentDocument);
|
super(_parentDocument, "php");
|
||||||
source = s;
|
source = s;
|
||||||
tagName = "#asp";
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///.
|
||||||
|
class AspCode : ServerSideCode {
|
||||||
///.
|
///.
|
||||||
override string nodeValue() const {
|
this(Document _parentDocument, string s) {
|
||||||
return this.source;
|
super(_parentDocument, "asp");
|
||||||
|
source = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
///.
|
|
||||||
override string writeToAppender(Appender!string where = appender!string()) const {
|
|
||||||
auto start = where.data.length;
|
|
||||||
where.put("<");
|
|
||||||
where.put(source);
|
|
||||||
where.put(">");
|
|
||||||
return where.data[start .. $];
|
|
||||||
}
|
|
||||||
|
|
||||||
///.
|
|
||||||
string source;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///.
|
///.
|
||||||
|
@ -3819,7 +3807,7 @@ class Document : FileResource {
|
||||||
|
|
||||||
auto cdataStart = pos;
|
auto cdataStart = pos;
|
||||||
|
|
||||||
typeof(indexOf(data, "")) end = -1;
|
ptrdiff_t end = -1;
|
||||||
typeof(end) cdataEnd;
|
typeof(end) cdataEnd;
|
||||||
|
|
||||||
if(pos < data.length) {
|
if(pos < data.length) {
|
||||||
|
@ -4038,7 +4026,7 @@ class Document : FileResource {
|
||||||
if(tagName == "script" || tagName == "style") {
|
if(tagName == "script" || tagName == "style") {
|
||||||
if(!selfClosed) {
|
if(!selfClosed) {
|
||||||
string closer = "</" ~ tagName ~ ">";
|
string closer = "</" ~ tagName ~ ">";
|
||||||
typeof(indexOf(data, closer)) ending;
|
ptrdiff_t ending;
|
||||||
if(pos >= data.length)
|
if(pos >= data.length)
|
||||||
ending = -1;
|
ending = -1;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue