Skip to content

Commit

Permalink
feat: more flexible unit parse
Browse files Browse the repository at this point in the history
  • Loading branch information
Beforerr committed Feb 11, 2025
1 parent 2920e11 commit 86adffb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ function Unitful.unit(var::AbstractDataContainer)
catch
end
try # replace space by *
return uparse(replace(u_str, " " => "*"))
u_str = replace(u_str, " " => "*", "{" => "", "}" => "", "#" => "1")
return uparse(u_str)
catch
end
try # split str by space
Expand Down

0 comments on commit 86adffb

Please sign in to comment.