Giter Club home page Giter Club logo

hammer-editor's Introduction

Hammer Logo Hammer: A story editor

A simple tool for building stories.

badge-kotlin MIT License CircleCI codebeat badge codecov

badge-platform-android badge-platform-windows badge-platform-linux badge-platform-macos

Discord badge Localization badge

Available on:

Google Play F-Droid GitHub

Note: This is currently Alpha quality software, users beware!

Take a look at the Roadmap to see whats coming.

Community

Join our Discord and help us by reporting bugs, making feature requests, and discussing the future of Hammer.

Or visit us on Reddit at r/hammereditor

Multi-platform

This app is where ever you are. Your phone, tablet, desktop, laptop, this program can be installed and run, not simply a website-in-a-box, but instead using native client side technologies to provide the best experience possible.

Will add support for more platforms in the future:

  • badge-platform-ios

Multi-Screen

Whether you are on a phone, tablet, or desktop, Hammer will make the best use of your screen space. Also supporting both light and dark modes.

Screen Shots

Offline first

I was frustrated with most of the story writing software I was finding as they were using web technologies (aka: Web Page in a box) which always seems to run into problems while being used offline for long periods of time. Hammer is designed from the ground up to be entirely local, no internet connection required, ever.

Transparent Data

Your data is yours. It's not stored in the cloud, or some opaque database. It is stored in simple, human readable files, just using files and folders to define the project structure. You can open your OSes file browser and take a look for your self. If this program went away today you would be able to easily interact with your data.

Intelligent Syncing between devices

Your data can be synchronized between devices allowing you to work on your story from anywhere, and have no fear of a change on one device, overwriting a change on another device.

Optional and Self hosted Syncing

Syncing is entirely optional, you can install the client and use it on one device, or you can install the server and sync your data between devices. You could even use some other service to sync your data, like Dropbox or Google Drive. It's all up to you. Instructions can be found here.

If you don't know how, or just don't want to setup your own server, we're also running an official syncing server.

Official Server: hammer.ink

while we're still early in development here, the official server is invite only. but I'll approve anyone for now, just ask.

We're also running a test environment here: test.hammer.ink which is always running the latest commit.

Do not use the test environment for real data! It will get cleared from time-to-time without notice!

Development

Want to contribute? Great! Here are some instructions to get you started.

Redeploy

hammer-editor's People

Contributors

begin-theadventure avatar blujai831 avatar comradekingu avatar cotimarinr avatar cwbooth5 avatar eddiemattos avatar hunzel avatar jonaathan13 avatar kefir2105 avatar locrianz avatar renovate[bot] avatar secularsteve avatar wavesonics avatar weblate avatar wzk0 avatar yangyangdaji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hammer-editor's Issues

Translation

Hi!

I wanted to ask if you would have a possibility to include different languages into the app/software?
Would be happy to contribute in translating to german, I am a native speaker.

Kind regards!

Feature request: Set project directory on Android

This was originally a comment in #127 but then I thought better of it and decided it would be better as a feature request.

I'd love to be able to set the project directory on Android like I can on desktop, so that I can sync files with Syncthing and not have to mess around with hosting a server.

This project looks great so far, but this one change would make it absolutely incredible for me.

F-Droid listing

First congrats to your listing at F-Droid! At this point, apps are usually removed from my repo (especially when they did not establish reproducible builds) – but your Readme still links to my repo instead of F-Droid's. Will you replace those links?

App keeps crashing whenever I try to edit a chapter

Every single time I open "Alice in Wonderland", and go to edit one of the chapters, the app crashes every single time. And I just downloaded it.

My device is an Android "Sony Xperia 1 II" in case it's important.

Then again, the Edit Page is unusually laggy. Like it's literally taking up too many resources all at once.

If you require more information, I'll be glad to share it.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

bundler
Gemfile
circleci
.circleci/config.yml
  • cimg/android 2024.01
github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-java v4
  • codecov/codecov-action v4
.github/workflows/publish.yml
  • actions/checkout v4
  • actions/setup-java v4
  • ruby/setup-ruby v1
  • actions/cache v4
.github/workflows/publishInternal.yml
  • actions/checkout v4
  • actions/setup-java v4
  • ruby/setup-ruby v1
  • actions/cache v4
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • ncipollo/release-action v1
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • ncipollo/release-action v1
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • ncipollo/release-action v1
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • ncipollo/release-action v1
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • ncipollo/release-action v1
  • actions/checkout v4
  • ncipollo/release-action v1
gradle
buildSrc/src/main/java/changelog.kt
buildSrc/src/main/java/versioncode.kt
gradle.properties
settings.gradle.kts
build.gradle.kts
android/build.gradle.kts
base/build.gradle.kts
buildSrc/settings.gradle.kts
buildSrc/build.gradle.kts
common/build.gradle.kts
composeUi/build.gradle.kts
desktop/build.gradle.kts
gradle/libs.versions.toml
  • androidx.activity:activity-compose 1.9.0
  • androidx.core:core-ktx 1.13.1
  • androidx.appcompat:appcompat 1.7.0
  • net.harawata:appdirs 1.2.2
  • io.github.reactivecircus.cache4k:cache4k 0.13.0
  • androidx.test:core 1.6.1
  • androidx.test:core-ktx 1.6.1
  • com.appmattus.crypto:cryptohash 1.0.2
  • com.github.weisj:darklaf-core 3.0.2
  • androidx.glance:glance 1.1.0
  • androidx.glance:glance-appwidget 1.1.0
  • androidx.glance:glance-material3 1.1.0
  • org.jetbrains.compose.ui:ui-util 1.6.11
  • org.jetbrains.compose.ui:ui-text 1.6.11
  • io.github.qdsfdhvh:image-loader 1.8.1
  • io.github.qdsfdhvh:image-loader-extension-moko-resources 1.8.1
  • io.github.qdsfdhvh:image-loader-extension-blur 1.7.7
  • com.github.Dansoftowner:jSystemThemeDetector 3.8
  • androidx.test.ext:junit 1.2.1
  • androidx.test.ext:junit-ktx 1.2.1
  • io.github.koalaplot:koalaplot-core 0.6.1
  • org.jetbrains.kotlin:kotlin-reflect 2.0.0
  • org.jetbrains.kotlin:kotlin-test-junit 2.0.0
  • org.jetbrains.kotlinx:kotlinx-cli 0.3.6
  • org.jetbrains.kotlinx:kotlinx-datetime 0.6.0
  • org.jetbrains.kotlinx:atomicfu 0.24.0
  • org.jetbrains.kotlinx:atomicfu-gradle-plugin 0.24.0
  • io.kweb:kweb-core 1.4.12
  • org.jetbrains:markdown 0.7.3
  • dev.chrisbanes.material3:material3-window-size-class-multiplatform 0.5.0
  • com.google.android.material:material 1.12.0
  • com.darkrockstudios:mpfilepicker 3.1.0
  • io.github.aakira:napier 2.7.1
  • com.arkivanov.decompose:decompose 3.1.0
  • com.arkivanov.decompose:extensions-compose 3.1.0
  • com.arkivanov.decompose:extensions-android 3.1.0
  • com.arkivanov.essenty:lifecycle 2.1.0
  • com.arkivanov.essenty:lifecycle-coroutines 2.1.0
  • dev.icerock.moko:resources 0.24.1
  • dev.icerock.moko:resources-compose 0.24.1
  • dev.icerock.moko:resources-generator 0.24.1
  • dev.icerock.moko:resources-test 0.24.1
  • dev.icerock.moko:graphics 0.9.0
  • androidx.test:orchestrator 1.5.0
  • io.mockk:mockk 1.13.11
  • com.darkrockstudios:richtexteditor 1.4.1
  • com.mohamedrejeb.richeditor:richeditor-compose 1.0.0-rc05
  • androidx.test:runner 1.6.1
  • androidx.datastore:datastore-preferences 1.1.1
  • androidx.window:window 1.3.0
  • org.jetbrains.kotlinx:kotlinx-serialization-core 1.7.1
  • org.jetbrains.kotlinx:kotlinx-serialization-core-jvm 1.7.1
  • org.jetbrains.kotlinx:kotlinx-serialization-json 1.7.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.8.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-android 1.8.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-swing 1.8.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-jdk8 1.8.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.8.1
  • io.insert-koin:koin-bom 3.5.6
  • dev.burnoo:cokoin 1.0.0
  • net.peanuuutz.tomlkt:tomlkt 0.4.0
  • io.ktor:ktor-client-core 2.3.12
  • io.ktor:ktor-client-auth 2.3.12
  • io.ktor:ktor-client-logging 2.3.12
  • io.ktor:ktor-client-content-negotiation 2.3.12
  • io.ktor:ktor-client-encoding 2.3.12
  • io.ktor:ktor-client-okhttp 2.3.12
  • io.ktor:ktor-client-darwin 2.3.12
  • io.ktor:ktor-client-java 2.3.12
  • io.ktor:ktor-serialization-kotlinx-json 2.3.12
  • io.ktor:ktor-server-content-negotiation-jvm 2.3.12
  • io.ktor:ktor-server-core-jvm 2.3.12
  • io.ktor:ktor-serialization-kotlinx-json-jvm 2.3.12
  • io.ktor:ktor-server-call-logging-jvm 2.3.12
  • io.ktor:ktor-server-default-headers-jvm 2.3.12
  • io.ktor:ktor-server-compression-jvm 2.3.12
  • io.ktor:ktor-server-caching-headers-jvm 2.3.12
  • io.ktor:ktor-server-auth-jvm 2.3.12
  • io.ktor:ktor-server-netty-jvm 2.3.12
  • io.ktor:ktor-server-http-redirect 2.3.12
  • io.ktor:ktor-server-websockets 2.3.12
  • com.github.aymanizz:ktor-i18n 2.0.0
  • io.ktor:ktor-server-tests-jvm 2.3.12
  • io.ktor:ktor-server-test-host-jvm 2.3.12
  • io.ktor:ktor-network-tls-certificates 2.3.12
  • com.squareup.okio:okio 3.9.0
  • com.squareup.okio:okio-fakefilesystem 3.9.0
  • org.slf4j:slf4j-simple 2.0.13
  • com.benasher44:uuid 0.8.4
  • androidx.work:work-runtime-ktx 2.9.0
  • com.soywiz.korlibs.krypto:krypto 4.0.10
  • com.soywiz.korlibs.korio:korio 4.0.10
  • app.cash.sqldelight:sqlite-driver 2.0.2
  • app.cash.sqldelight:primitive-adapters 2.0.2
  • io.fluidsonic.locale:fluid-locale 0.13.0
  • io.herrera.kevin:resource 1.1.0
  • com.mikepenz:aboutlibraries-core 11.2.2
  • com.mikepenz:aboutlibraries-compose-m3 11.2.2
  • org.jetbrains.kotlinx:kover-gradle-plugin 0.8.2
  • com.russhwolf:multiplatform-settings-no-arg 1.1.1
  • com.soywiz.korge:korge-core 5.4.0
  • org.jetbrains.kotlin.multiplatform 2.0.0
  • org.jetbrains.kotlin.plugin.serialization 2.0.0
  • org.jetbrains.kotlin.jvm 2.0.0
  • org.jetbrains.kotlin.android 2.0.0
  • org.jetbrains.kotlin.plugin.parcelize 2.0.0
  • org.jetbrains.kotlin.plugin.power-assert 2.0.0
  • org.jetbrains.kotlin.plugin.atomicfu 2.0.0
  • com.android.application 8.5.0
  • com.android.library 8.5.0
  • org.jetbrains.compose 1.6.11
  • org.jetbrains.kotlin.plugin.compose 2.0.0
  • org.jetbrains.kotlinx.kover 0.8.2
  • dev.icerock.mobile.multiplatform-resources 0.24.1
  • io.ktor.plugin 2.3.12
  • app.cash.sqldelight 2.0.2
  • com.github.gmazzo.buildconfig 5.3.5
  • com.mikepenz.aboutlibraries.plugin 11.2.2
server/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7

  • Check this box to trigger a request for Renovate to run again on this repository

Encyclopedia: description field not visible without inserted text

Hi!

I started a project in the current android app (1.0.7) and added a Encyclopida entry (person). I did not fill out the description field, but I wanted to do this later. I wanted to create all the persons, before going into depth and describing them. When reopening the person entry I was not able to find and edit the field for the description. I had to make a new entry with the description field filled out to see where I have to click.
It would be great if there was an inline text of the empty field saying something like 'no description yet'.
Thank you!
Kind regards!

[Feature Request] Export as Epub

Would it be possible to add a function to export the book as an epub (including metadata like book cover, author etc.) where it keeps the formatting and starts each chapter on a new page?
Epub is better suited for reading apps because it is supported by (almost) all apps, the font size can be adjusted to your own needs etc. and I could share my book with friends without having to convert it to another format (here epub) via several steps through several apps (which I currently have to do)

widget shows demo category

Android 11, hammer 1.1.0
I deleted the Alice in Wonderland Project but the widget shows both the actual project I have and Alice in Wonderland. Just checked and it is apparently in order of project created, the new project I created was added to the end of the list. It did also remove the new project from the list when I deleted it.

create note: pop up distorts when note is too long

Screenshot_20230612_023026_Hammer

In the create a note popup the overlaying window is getting distorted and the buttons for cancel and create will be completely gone when having a note that is more than three lines long. Also, the line break comes too late and the window grows more to the right, pushing text to left side.

Project Storage on Android

Platform: Android 13 (Calyx OS 4.13.2)
App Version: v1.5.1 (F-Droid)

I can't find the offline Storage in my File Browser.
I was looking at /Android/data and /Android/media for a Folder called com.darkrockstudios.apps.hammer.android and was not able to find anything. Furthermore, I also checked if I could find it as a hidden Folder.

In my case I was searching the local storage to set up File synchronization with Syncthing.
Thanks a lot for this wonderful App :)

Release as flatpak/in flathub

As of 1.2.0, Hammer only releases as a .deb on linux. While this works for Debian based linux systems, others such as Fedora use RPM instead of deb and cannot easily install it.

Flatpak is a universal packaging system for linux applications, and uploading it to Flathub allows linux users to easily find, download, install, and update the app.

Please and thank you!

Flatpak website

Flathub website

Flathub submission documentation

[Bug] Wrong Global Settings path?

As requested by @Wavesonics in discord, here is the full logs in the terminal when trying to run the hammer application.

(c) Microsoft Corporation. All rights reserved.

C:\Windows\System32>"C:\Program Files\hammer\hammer.exe"
Aug 14, 2023 9:45:44 PM io.github.aakira.napier.DebugAntilog performLog
INFO: [INFO] Koin - loaded 45 definitions in 7.0218 ms
Aug 14, 2023 9:45:44 PM io.github.aakira.napier.DebugAntilog performLog
SEVERE: [ERROR] Koin - * Instance creation error : could not create instance for '[Singleton:'com.darkrockstudios.apps.hammer.common.data.globalsettings.GlobalSettingsRepository',binds:com.darkrockstudios.apps.hammer.common.data.globalsettings.GlobalSettingsRepository]': java.nio.file.InvalidPathException: Illegal charobonxt\HammerProjects\server.json
        java.base/sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
        java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        java.base/sun.nio.fs.WindowsPath.parse(Unknown Source)
        java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
        java.base/java.nio.file.Path.of(Unknown Source)
        java.base/java.nio.file.Paths.get(Unknown Source)
        okio.Path.toNioPath(Path.kt:103)
        okio.NioSystemFileSystem.metadataOrNull(NioSystemFileSystem.kt:37)
        okio.internal._FileSystemKt.commonExists(-FileSystem.kt:38)
        okio.FileSystem.exists(FileSystem.kt:38)
        com.darkrockstudios.apps.hammer.common.data.globalsettings.GlobalSettingsRepository.loadServerSettings(GlobalSettingsRepository.kt:128)
        com.darkrockstudios.apps.hammer.common.data.globalsettings.GlobalSettingsRepository.<init>(GlobalSettingsRepository.kt:61)
        com.darkrockstudios.apps.hammer.common.dependencyinjection.MainModuleKt$mainModule$1$invoke$$inlined$singleOf$default$5.invoke(SingleOf.kt:229)
        com.darkrockstudios.apps.hammer.common.dependencyinjection.MainModuleKt$mainModule$1$invoke$$inlined$singleOf$default$5.invoke(SingleOf.kt:69)
        org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:51)
        org.koin.core.instance.SingleInstanceFactory.create(SingleInstanceFactory.kt:46)
        org.koin.core.instance.SingleInstanceFactory$get$1.invoke(SingleInstanceFactory.kt:53)
        org.koin.core.instance.SingleInstanceFactory$get$1.invoke(SingleInstanceFactory.kt:51)
        org.koin.mp.KoinPlatformTools.synchronized(KoinPlatformTools.kt:20)
        org.koin.core.instance.SingleInstanceFactory.get(SingleInstanceFactory.kt:51)
        org.koin.core.registry.InstanceRegistry.resolveInstance$koin_core(InstanceRegistry.kt:116)
        org.koin.core.scope.Scope.resolveValue(Scope.kt:246)
        org.koin.core.scope.Scope.resolveInstance(Scope.kt:231)
        org.koin.core.scope.Scope.get(Scope.kt:210)
        com.darkrockstudios.apps.hammer.desktop.MainKt.main(Main.kt:170)
Exception in thread "main" org.koin.core.error.InstanceCreationException: Could not create instance for '[Singleton:'com.darkrockstudios.apps.hammer.common.data.globalsettings.GlobalSettingsRepository',binds:com.darkrockstudios.apps.hammer.common.data.globalsettings.GlobalSettingsRepository]'
        at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:58)
        at org.koin.core.instance.SingleInstanceFactory.create(SingleInstanceFactory.kt:46)
        at org.koin.core.instance.SingleInstanceFactory$get$1.invoke(SingleInstanceFactory.kt:53)
        at org.koin.core.instance.SingleInstanceFactory$get$1.invoke(SingleInstanceFactory.kt:51)
        at org.koin.mp.KoinPlatformTools.synchronized(KoinPlatformTools.kt:20)
        at org.koin.core.instance.SingleInstanceFactory.get(SingleInstanceFactory.kt:51)
        at org.koin.core.registry.InstanceRegistry.resolveInstance$koin_core(InstanceRegistry.kt:116)
        at org.koin.core.scope.Scope.resolveValue(Scope.kt:246)
        at org.koin.core.scope.Scope.resolveInstance(Scope.kt:231)
        at org.koin.core.scope.Scope.get(Scope.kt:210)
        at com.darkrockstudios.apps.hammer.desktop.MainKt.main(Main.kt:170)
obonxt\HammerProjects\server.jsonathException: Illegal char <
        at java.base/sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
        at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at java.base/sun.nio.fs.WindowsPath.parse(Unknown Source)
        at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
        at java.base/java.nio.file.Path.of(Unknown Source)
        at java.base/java.nio.file.Paths.get(Unknown Source)
        at okio.Path.toNioPath(Path.kt:103)
        at okio.NioSystemFileSystem.metadataOrNull(NioSystemFileSystem.kt:37)
        at okio.internal._FileSystemKt.commonExists(-FileSystem.kt:38)
        at okio.FileSystem.exists(FileSystem.kt:38)
        at com.darkrockstudios.apps.hammer.common.data.globalsettings.GlobalSettingsRepository.loadServerSettings(GlobalSettingsRepository.kt:128)
        at com.darkrockstudios.apps.hammer.common.data.globalsettings.GlobalSettingsRepository.<init>(GlobalSettingsRepository.kt:61)
        at com.darkrockstudios.apps.hammer.common.dependencyinjection.MainModuleKt$mainModule$1$invoke$$inlined$singleOf$default$5.invoke(SingleOf.kt:229)
        at com.darkrockstudios.apps.hammer.common.dependencyinjection.MainModuleKt$mainModule$1$invoke$$inlined$singleOf$default$5.invoke(SingleOf.kt:69)
        at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:51)
        ... 10 more
Failed to launch JVM

C:\Windows\System32>```

Some name problem in Chinese.

I just wanna say that it's the best and the most beautiful story editor I have ever used. So I have already translated it in Simplified Chinese totally here, but there is still a problem when I try to create a new book.

Just as this photo shows, I am going to create a new book called "我". This is a Chinese character. But after tapping the Create Project, nothing happens. There is no new book called "我".

Screenshot_2023-06-14-09-31-19-457_com darkrockstudios apps hammer android

The same problem is also found in Creating Group and Creating Scene.

I think what causes this problem may be the utf-8 code error (Just guess! I know nothing about coding🤣). I really love this software and hope you can fix this!

Export feature doesn't work.

For more info,
I'm using a Realme C30, Android Version 11.

Upon taping export, the app prompts me to choose the export location. But when I do so, the app restarts and nothing happens. If it try to export again, I get prompted again to choose export location. Upon repeating this process multiple times, my device sends a warning that the app has crashed multiple times.

I haven't tried replicating this issue on my other phone yet, so not sure if it's just a me problem.

Server login dialog does not accept URL containing both subdomains and numbers before port component

If a URL containing both at least one subdomain component, and numbers before the port component but after the leading subdomain component, is given during server login, the dialog reports "Invalid URL." Consider for example the URL hammer.blujai831.dev.

The cause of the problem seems to be in common/src/commonMain/kotlin/com/darkrockstudios/apps/hammer/common/components/projectselection/accountsettings/AccountSettingsComponent.kt, wherein urlWithPortRegex is defined as Regex("""^(?:w{1,3}\.)?[^\s.]+(?:\.[a-z]+)*(?::\d+)?(?![^<]*(?:</\w+>|/?>))$""").

I suspect the specific cause of the issue is the use of [a-z]+, rather than, e.g., [a-z0-9]+, in the (?:\.[a-z]+)* part. Until I took a closer look at the regex, I assumed the problem was just any URL with a subdomain, as I did not experience the issue until trying to use one, but on closer inspection, it looks like the regex should have no problem handling subdomains if the root domain name does not contain numbers.

On further consideration, I realize it might be difficult to fix this issue without creating overlap between this regex and the IP regex. If that's the case, I might recommend sidestepping the overlap by having the IP regex take precedence and using the URL regex as a fallback, and/or making the "Invalid URL" error advisory rather than restrictive.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.