Update regexes with u option

And add pw validations
This commit is contained in:
Thelonius Kort
2023-02-14 20:56:57 +01:00
parent 66a61c8380
commit 7297a907da
2 changed files with 7 additions and 7 deletions

View File

@ -63,7 +63,7 @@ defmodule Outlook.HtmlPreparations.HtmlPreparation do
def set_sibling_with([ node | rest ]) do
sib_with = case node.type do
:text -> Regex.match?(~r/^\s*$/, node.content) && :both || :inline
:text -> Regex.match?(~r/^\s*$/u, node.content) && :both || :inline
:comment -> :both
end
[ %InternalNode{ node | eph: %{sibling_with: sib_with} } | set_sibling_with(rest) ]
@ -73,7 +73,7 @@ defmodule Outlook.HtmlPreparations.HtmlPreparation do
def strip_whitespace_textnodes [ %{type: :text} = node | rest] do
if Regex.match?(~r/^\s*$/, node.content) do
if Regex.match?(~r/^\s*$/u, node.content) do
strip_whitespace_textnodes(rest)
else
[ node | strip_whitespace_textnodes(rest)]