Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize input files for !inspiration #78

Merged
merged 2 commits into from
Jul 12, 2018

Conversation

Josh-Matsuoka
Copy link
Contributor

Hi,

This PR addresses a bug in the !inspiration command. Due to the way the input files are parsed, a certain pair of inspirations would be parsed as a single one:

!inspiration
When I'm ready to make a photograph, I think I quite obviously see in my minds
eye something that is not literally there in the true meaning of the word. I'm
interested in something which is built up from within, rather than just
extracted from without.
― Ansel Adams
%%
When in doubt, tell the truth.
― Mark Twain

This fix sanitizes both the inspirations and the inspiration index to address this issue.

@@ -103,7 +103,7 @@
373
376
378
379:$100 invested at 7% interest for 100 years will become $100,000, at
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is actually causing the problem? Is it % anywhere, symbols generally or specifically %/symbol at the start of a sentence? Are the removals in this file just a precaution?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was more of a case of how that file was generated, It seems to have failed to parse out any lines with % in them. I cleaned that up while I was at it.

What caused the problem was the inspirations file using % as a line delimiter and a single line being %%

@omajid
Copy link
Contributor

omajid commented Jul 10, 2018

cough tests cough

@onyiny-ang
Copy link
Contributor

#52 is coming back from the dead. . .maybe :)

@onyiny-ang onyiny-ang merged commit 9409d38 into oldterns:master Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants