watermarkchurch / wcc-contentful

An alternative to Contentful's contentful.rb ruby client, contentful_model, and contentful_rails gems all in one.
MIT License
2 stars 1 forks source link

60 embedded cta #130

Closed rorJeremy closed 5 years ago

rorJeremy commented 5 years ago

closes https://zube.io/watermarkchurch/development/c/3411

watermarkchurch-bot commented 5 years ago
1 Warning
:warning: No issue referenced - please create an issue describing a single unit of work and reference it using “closes #[the issue number]”

Generated by :no_entry_sign: Danger

coveralls commented 5 years ago

Coverage Status

Coverage increased (+1.03%) to 95.92% when pulling f17b44e3017bcbd81caee4d2f9db126d01a2812f on 60_embedded_cta into fd69184c7e7e5b9b735d3c177eea01f0df66c13c on master.

rorJeremy commented 5 years ago

Thanks for the feedback @gburgett . I added those test cases, and no doubt this feature is more resilient because of it. Some of the test cases I think are reasonable that they don't "work", like if the user completely forgets to include the link part. Others were actually very good catches on your part and required me to update the code, like handling hash locations and different amounts of spacing. I think the cases that deal with the new lines are a soft point with RedCarpet in general, so the tests are added for those scenarios are basically just serving as documentation right now to let anyone know that the link won't render as desired if you write it like that.

Let me know if you see anything else I should address, and if not, I would like to get this merged and released so I can use it in my PR for wmresources next.

gburgett commented 5 years ago

Hey jeremy, thanks for getting on this! My intention was not to say that all those scenarios need to produce the link output with the intended classes. There's room for us to train admins on how to make a button that actually renders properly. I do however think we should be careful not to introduce any null pointer exceptions. My primary purpose in giving all these examples is to exercise all the corners of those regexps and make sure nothing is null where it isn't supposed to be.

As long as we have a definition for what the behavior ought to be for each of those scenarios, I'm good with it!