Challenge:
Some ascii-art is a pain to make, but makes code comments easier to read, especially when the code is dense. The challenge is to make a simple tool that converts comments to simple ascii-art with arrows. The comments to modify are delimited by empty comments.
For example, supposing Haskell comment syntax, convert this:
--
-- Here's a thing
-- Here's another thing
-- The most important thing
-- * * *
--
f x=x+1*x*1*1*0
To this:
-- /------------< Here's a thing
-- | /-------< Here's another thing
-- | | /-< The most important thing
-- | | |
-- v v v
f x=x+1*x*1*1*0
Rules:
- Your answer may be either a function or full program
- You may pick the language this is made to work with, replacing the "--" with two or more characters that delimit a comment in some language
- If using another comment format that requires beginning and ending delimiters, each line of the reformatted sections must be a proper comment
- The sections to be reformatted are delimited by the empty comment "\n--\n"
- Besides adding newlines, the program must not change any of the input except the delimited sections
- A comment filled with an arbitrary number of spaces may come immediately before a properly formatted section of output
- Standard loopholes are disallowed
Additional Examples:
(input)
--
--
(output)
nothing
(input)
[Code Here]
--
-- important
-- *
--
(output)
[Code Here]
-- /-< important
-- |
-- v
(input)
--
-- Do
-- Re
-- Mi
-- Fa
-- So
-- *****
--
(output)
-- /-----< Do
-- |/----< Re
-- ||/---< Mi
-- |||/--< Fa
-- ||||/-< So
-- |||||
-- vvvvv
Scoring:
- Fewest bytes wins
- Submissions without explanations or non-trivial example input/output will not be considered (though I will leave a grace period to allow time to add such)