Browse Source

Update hashtag regex

merge-requests/4/head
Mark Felder 5 years ago
parent
commit
698b561d6d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/auto_linker/parser.ex

+ 1
- 1
lib/auto_linker/parser.ex View File

@ -45,7 +45,7 @@ defmodule AutoLinker.Parser do
# https://www.w3.org/TR/html5/forms.html#valid-e-mail-address
@match_email ~r/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/u
@match_hashtag ~r/^(?<tag>\#\w+)/u
@match_hashtag ~r/^(?<tag>\#[A-Za-z][A-Za-z0-9_]+)/u
@prefix_extra [
"magnet:?",


Loading…
Cancel
Save