From f9757af3f0c949d1a8e08e29a521b40ea7c3ddff Mon Sep 17 00:00:00 2001 From: TheRoniOne Date: Fri, 5 Jan 2024 17:18:48 -0500 Subject: [PATCH] Fix ' not being a special char in polish_names --- src/polish_names.jl | 2 +- test/test_polish_names.jl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/polish_names.jl b/src/polish_names.jl index 0422dae..f71500f 100644 --- a/src/polish_names.jl +++ b/src/polish_names.jl @@ -4,7 +4,7 @@ struct Style{T} end Style(s::Symbol) = Style{s}() -const SPECIAL_CHARS = r"[\s\-\.\_\/\:\\\*\?\"\>\<\|]" +const SPECIAL_CHARS = r"[\s\-\.\_\/\:\\\*\?\"\'\>\<\|]" """ polish_names!(table::CleanTable; style::Symbol=:snake_case) diff --git a/test/test_polish_names.jl b/test/test_polish_names.jl index 907b935..c3c0d34 100644 --- a/test/test_polish_names.jl +++ b/test/test_polish_names.jl @@ -32,14 +32,14 @@ using DataFrames: DataFrame " _aName with_loTsOfProblems", " _aName with_loTsOfProblems", " _aName with_loTsOfProblems_1", - " _aName with_loTsOfProblems_1_a/b", + " _aName with_loTsOfProblems_1_a/b'c", ]; style=:snake_case, ) == Vector{Symbol}([ :a_name_with_lo_ts_of_problems, :a_name_with_lo_ts_of_problems_1, :a_name_with_lo_ts_of_problems_1_1, - :a_name_with_lo_ts_of_problems_1_a_b, + :a_name_with_lo_ts_of_problems_1_a_b_c, ]) @test generate_polished_names( @@ -48,7 +48,7 @@ using DataFrames: DataFrame " _aName with_loTsOfProblems", " _aName with_loTsOfProblems_1", " _aNameABC with_loTsOfProblemsDEF", - " _aNameABC with_loTsOfProblemsDEF_a/b", + " _aNameABC with_loTsOfProblemsDEF_a/b'c", ]; style=:camelCase, ) == Vector{Symbol}([ @@ -56,7 +56,7 @@ using DataFrames: DataFrame :aNameWithLoTsOfProblems_1, :aNameWithLoTsOfProblems1, :aNameABCWithLoTsOfProblemsDEF, - :aNameABCWithLoTsOfProblemsDEFAB, + :aNameABCWithLoTsOfProblemsDEFABC, ]) let err = nothing