=> f9ee0a6e3a4c9fa0c72def689a17d08394035d60
[1mdiff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c[m [1mindex fa3ce368..653057af 100644[m [1m--- a/src/ui/inputwidget.c[m [1m+++ b/src/ui/inputwidget.c[m [36m@@ -41,6 +41,7 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m #include[m #include [m #include [m [32m+[m[32m#include [m #include [m #include [m #include [m [36m@@ -1015,10 +1016,16 @@[m [mstatic const iString *omitDefaultScheme_(iString *url) {[m const iString *text_InputWidget(const iInputWidget *d) {[m iString *text = collect_String(d ? text_InputWidget_(d) : new_String());[m if (d && d->inFlags & isUrl_InputWidgetFlag) {[m [31m- /* Add the "gemini" scheme back if one is omitted. */[m [31m- //restoreDefaultScheme_(text);[m [31m- [m [31m- /* TODO: Check for `hostname:port` pattern and fit it so it'll be parsed correctly. */[m [32m+[m[32m /* Check for `hostname:port` pattern and fit it so it'll be parsed correctly. */[m [32m+[m[32m static iRegExp *simpleHost;[m [32m+[m[32m if (!simpleHost) {[m [32m+[m[32m simpleHost = new_RegExp("^[\\w.-]+:\\d{1,5}$", caseInsensitive_RegExpOption);[m [32m+[m[32m }[m [32m+[m[32m iRegExpMatch m;[m [32m+[m[32m init_RegExpMatch(&m);[m [32m+[m[32m if (matchString_RegExp(simpleHost, text, &m)) {[m [32m+[m[32m prependCStr_String(text, "gemini://");[m [32m+[m[32m }[m }[m return text;[m }[m
text/gemini; charset=utf-8
This content has been proxied by September (3851b).