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

Pass DownOptions to DownView #147

Closed
1 task done
ladislas opened this issue May 14, 2019 · 4 comments · Fixed by #148
Closed
1 task done

Pass DownOptions to DownView #147

ladislas opened this issue May 14, 2019 · 4 comments · Fixed by #148

Comments

@ladislas
Copy link
Contributor

Please help prevent duplicate issues before submitting a new one:

  • I've searched other open/closed issues for duplicates before opening up this new issue.

Report

What did you do?

I was using Down v0.5.2 that was working great for my use case: a markdown file with a lot of inline html <span class="myClass"></span> that I used to render specific words or lines with my custom CSS.

Then I upgraded to v0.8.2...

What did you expect to happen?

Nothing, just to keep working the way it was.

What happened instead?

Rendering and custom css works for generic elements but my spans are gone and/or are not rendered anymore. Even simple <strong></strong> are removed :(

Analysis & Next step

The reason is that in DownView, we render HTML with the .default DownOptions.

Would you accept a PR that adds the ability to specify an option when calling update(:)? Or setting a var that would be read by loadHTMLView(:)?

If so, I can make one now :) That would make my life easier with my current codebase...

Best,
-- Ladislas

@iwasrobbed
Copy link
Collaborator

iwasrobbed commented May 15, 2019

Hi @ladislas 👋 Correct, the HTML sanitization behavior changed so that it sanitizes HTML by default, so I'd be open to adding a DownOptions argument to both the init and update methods on DownView

I'm more than happy to accept a PR for these (thank you for offering), just please be sure to add a quick test in DownViewTests so we make sure we don't break this in the future 👍

@ladislas
Copy link
Contributor Author

Great! Thanks for the quick reply, will do asap! :)

iwasrobbed pushed a commit that referenced this issue May 15, 2019
* add DownOptions to init and update methods - closes #147

* add test for DownOptions init and update
@iwasrobbed
Copy link
Collaborator

@ladislas 🚀 Released as v0.8.3, thanks again for raising an issue

@ladislas
Copy link
Contributor Author

Thanks a lot for merging the changes quickly :)

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 a pull request may close this issue.

2 participants