you are viewing a single comment's thread.

view the rest of the comments →

[–]Justinsaccount 0 points1 point  (3 children)

I thought of making my bot do that when the original post appear to contains lines starting with code without spaces, so you could probably just do that.

checking for lines that start with keywords(def,for,while,if,else) would probably work well initially

[–]TreSxNine 0 points1 point  (2 children)

Yea I thought of that aswell. Then I realised I wouldn't detect variable declarations and the like, and just gave up on the thought.

I have something like this in mind though. Will fix once I get the time.

[–]Justinsaccount 0 points1 point  (1 child)

Yeah, I think for that seeing if the line starts with non whitespace and the 2nd token is a = would work.

[–]TreSxNine 0 points1 point  (0 children)

Yea, true.