ggthemeassist icon indicating copy to clipboard operation
ggthemeassist copied to clipboard

Escape quotes in text fields

Open Breza opened this issue 5 years ago • 2 comments

First off, I'm a big fan! I use ggthemeassist all the time when getting my plots ready for publication.

I keep forgetting to escape single quotes when writing titles, which results in an error when I'm done customizing my plot. In the example below, the word "I'm" caused the error. Any chance you can sanitize the inputs to prevent this from happening?

Warning: Error in parse: <text>:3:171: unexpected symbol
2:  + 
3: labs(title  =  'This is where the title goes. Yup, right here.', x  =  'Age', y  =  'Probability of a bad thing happening', subtitle  =  'The subtitle goes here. I'm

Breza avatar Jun 13 '19 15:06 Breza

Thanks for the kind words. I made some small changes, I hope the problem is fixed. Please test it and give a short feedback.

calligross avatar Jun 15 '19 06:06 calligross

Thank you so much, the problem is fixed! Again, this is an excellent addin and I appreciate the work you've put into it.

Breza avatar Jun 23 '19 03:06 Breza