mirror of https://github.com/adamdruppe/arsd.git
opt into phobos functions here as arsd.core starts to replace
This commit is contained in:
parent
97e560bcff
commit
13a767fd31
2
html.d
2
html.d
|
|
@ -10,6 +10,8 @@ module arsd.html;
|
||||||
|
|
||||||
import arsd.core : encodeUriComponent;
|
import arsd.core : encodeUriComponent;
|
||||||
|
|
||||||
|
import std.string : indexOf, startsWith, endsWith, strip;
|
||||||
|
|
||||||
public import arsd.dom;
|
public import arsd.dom;
|
||||||
import arsd.color;
|
import arsd.color;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import arsd.color;
|
||||||
import std.string;
|
import std.string;
|
||||||
|
|
||||||
import std.uni : isWhite;
|
import std.uni : isWhite;
|
||||||
|
import std.string : indexOf, startsWith, endsWith, strip;
|
||||||
|
|
||||||
///
|
///
|
||||||
class HtmlConverter {
|
class HtmlConverter {
|
||||||
|
|
|
||||||
7
web.d
7
web.d
|
|
@ -11,7 +11,6 @@
|
||||||
+/
|
+/
|
||||||
module arsd.web;
|
module arsd.web;
|
||||||
|
|
||||||
|
|
||||||
static if(__VERSION__ <= 2076) {
|
static if(__VERSION__ <= 2076) {
|
||||||
// compatibility shims with gdc
|
// compatibility shims with gdc
|
||||||
enum JSONType {
|
enum JSONType {
|
||||||
|
|
@ -226,6 +225,8 @@ public import std.range;
|
||||||
public import std.traits;
|
public import std.traits;
|
||||||
import std.json;
|
import std.json;
|
||||||
|
|
||||||
|
import std.string : indexOf, endsWith, startsWith;
|
||||||
|
|
||||||
/// This gets your site's base link. note it's really only good if you are using FancyMain.
|
/// This gets your site's base link. note it's really only good if you are using FancyMain.
|
||||||
string getSiteLink(Cgi cgi) {
|
string getSiteLink(Cgi cgi) {
|
||||||
return cgi.requestUri[0.. cgi.requestUri.indexOf(cgi.scriptName) + cgi.scriptName.length + 1 /* for the slash at the end */];
|
return cgi.requestUri[0.. cgi.requestUri.indexOf(cgi.scriptName) + cgi.scriptName.length + 1 /* for the slash at the end */];
|
||||||
|
|
@ -631,7 +632,7 @@ class ApiProvider : WebDotDBaseType {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// the builtins aren't interesting either
|
// the builtins aren't interesting either
|
||||||
if(key.startsWith("builtin."))
|
if(std.string.startsWith(key, "builtin."))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(func.originalName.length)
|
if(func.originalName.length)
|
||||||
|
|
@ -1879,7 +1880,7 @@ Form createAutomaticForm(Document document, string action, in Parameter[] parame
|
||||||
} else if (type == "radio") {
|
} else if (type == "radio") {
|
||||||
assert(0, "FIXME");
|
assert(0, "FIXME");
|
||||||
} else {
|
} else {
|
||||||
if(type.startsWith("textarea")) {
|
if(std.string.startsWith(type, "textarea")) {
|
||||||
input = Element.make("textarea");
|
input = Element.make("textarea");
|
||||||
input.name = param.name;
|
input.name = param.name;
|
||||||
input.innerText = param.value;
|
input.innerText = param.value;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue