Fix the default RegExp for link validation to support port and match the beginning.

pull/1329/head
kmh 2 years ago
parent a41a1bb513
commit f1d344e28f
  1. 2
      lib/src/models/rules/insert.dart

@ -330,7 +330,7 @@ class AutoFormatMultipleLinksRule extends InsertRule {
// https://example.net/
// URL generator tool (https://www.randomlists.com/urls) is used.
static const _linkPattern =
r'(https?:\/\/|www\.)[\w-\.]+\.[\w-\.]+(\/([\S]+)?)?';
r'^https?:\/\/[\w\-]+(\.[\w\-]+)*(:\d+)?(\/.*)?$';
static final linkRegExp = RegExp(_linkPattern, caseSensitive: false);
@override

Loading…
Cancel
Save