Skip to content

Comment on CONL: "Markdown" for your config filesparent

Comments

The problem is when a config value includes a semicolon, and the rest of the line gets ignored unintentionally, especially because strings aren't quoted

Ah, I see, so the problem is not a semicolon "used in comments", it's a semicolon used outside them. But then which character would you suggest instead? The article notes that there is the same problem with # (e.g. in `black = #000000`) and // (`url = https://en.wikipedia.com`). And these are arguably more common.

What about three simple rules to define comments:

1. If # is in the first column of the line.

2. If # is followed by a space.

3. The # only starts a comment when it’s outside of quotes.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.