Skip to content

Commit

Permalink
Extract function
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Jan 20, 2025
1 parent 51c81d9 commit 714146c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion template/src/Elm/Review/Reporter.elm
Original file line number Diff line number Diff line change
Expand Up @@ -736,11 +736,16 @@ getIndexOfFirstNonSpace string =

lineNumberPrefix : Int -> Int -> String
lineNumberPrefix maxLineNumberLength rowIndex =
lineNumberPrefixUnpadded maxLineNumberLength rowIndex ++ " "


lineNumberPrefixUnpadded : Int -> Int -> String
lineNumberPrefixUnpadded maxLineNumberLength rowIndex =
((rowIndex + 1)
|> String.fromInt
|> String.padLeft maxLineNumberLength ' '
)
++ "| "
++ "|"


lengthOfLineNumber : Int -> Int
Expand Down

0 comments on commit 714146c

Please sign in to comment.