mp4096 / indentex

An indentation-based superset of LaTeX
MIT License
9 stars 2 forks source link

Silently ignored edge cases (e.g. missing colon) #8

Closed syxolk closed 7 years ago

syxolk commented 7 years ago

I think its a bit strange to just ignore these cases while also not showing any warnings or errors:

# test
#test:
#test

I had at least two occasions on a single day when I had to look into the generated tex files to find out why my stuff doesn't work, only to see that I forgot a colon.

mp4096 commented 7 years ago

Yep, this is a good one!

Also, all these three cases are invalid LaTeX syntax (however, e.g. #1 is valid). So it's safe to assume that the user intended to type an indentex command.


This will require a good deal of refactoring. Essentially, a result of line parsing should be something like

enum Hashline {
    OpenEnv(Environment),
    PlainLine(String),
    HashlineWarning(String, String),
}

However, I wanted to refactor line parsing anyway, so...

mp4096 commented 7 years ago

Let's move to #23 for this one.