Skip to content

Commit 626ce01

Browse files
committed
more regex fixes
1 parent 09c7022 commit 626ce01

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## [v0.5.0] - 2022-06-11 10:05:43
4+
5+
### Added
6+
7+
### Changed
8+
9+
- fixed regex search again, perhaps
10+
11+
### Removed
12+
13+
### Deprecated
14+
15+
# ────────────────────────────────────────────────────────────────────────────────────
316
## [v0.5.0] - 2022-06-10 18:51
417

518
### Added

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Glyphy"
22
uuid = "e3b492bb-b251-48f2-9293-5b5772365208"
33
authors = ["cormullion <[email protected]>"]
4-
version = "0.5.0"
4+
version = "0.6.0"
55

66
[deps]
77
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"

src/Glyphy.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,13 @@ function glyphy(s::String;
123123
showall = false )
124124
# filter looks at values
125125
# if it doesn't look like a regex
126-
if all(c -> isletter(c) || isdigit(c) || isspace(c) || isequal(c, "-"), map(Char, s)) == true
126+
if all(c -> isletter(c) || isdigit(c) || isspace(c) || isequal(c, '-') || isequal(c, '<'), map(Char, s)) == true
127127
# don't do a regex
128128
hitvalues = filterview(v -> occursin(s, v), unicodedict)
129129
else
130130
# do a regex
131-
hitvalues = filterview(v -> occursin(Regex(s, "i"), v), unicodedict)
131+
rgx = Regex(s, "i")
132+
hitvalues = filterview(v -> occursin(rgx, v), unicodedict)
132133
end
133134
# result is another Dictionary{Int64, String}
134135
if isempty(hitvalues)

0 commit comments

Comments
 (0)