Skip to content

Commit

Permalink
fix: rename {hsl,rgb}_function_parser > parser (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akianonymus authored Dec 22, 2024
1 parent d38c311 commit 29ee3fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/colorizer/parser/hsl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ local hsl_to_rgb = require("colorizer.color").hsl_to_rgb
-- - `prefix` (string): "hsl" or "hsla" to specify the CSS function type.
-- @return number|nil The end index of the parsed `hsl/hsla` function within the line, or `nil` if no match was found.
-- @return string|nil The RGB hexadecimal color (e.g., "ff0000" for red), or `nil` if parsing failed
function M.hsl_function_parser(line, i, opts)
function M.parser(line, i, opts)
local min_len = #"hsla(0,0%,0%)" - 1
local min_commas, min_spaces = 2, 2
local pattern = "^"
Expand Down
2 changes: 1 addition & 1 deletion lua/colorizer/parser/rgb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local count = require("colorizer.utils").count
-- - `prefix` (string): "rgb" or "rgba" to specify the CSS function type
-- @return number|nil The end index of the parsed `rgb/rgba` function within the line, or `nil` if parsing failed
-- @return string|nil The RGB hexadecimal color (e.g., "ff0000" for red), or `nil` if parsing failed
function M.rgb_function_parser(line, i, opts)
function M.parser(line, i, opts)
local min_len = #"rgba(0,0,0)" - 1
local min_commas, min_spaces, min_percent = 2, 2, 3
local pattern = "^"
Expand Down

0 comments on commit 29ee3fa

Please sign in to comment.