Wait, if we don't need to handle leading whitespaces (which we don't need AFAIK, although it might be nice), the logic is merely if (*line && *line != '[' && *line != '#') comment();, isn't it?
Yes, but I also think we shouldn't add # on empty lines or lines containing only whitespaces.
I could modify the code to use sci_get_line()
and work on lines instead of individual characters, it just mens allocating/deallocating strings for each line (not that it matters much performance-wise though). Not sure which option is better here.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.