chrisdhaan / CDMarkdownKit

An extensive Swift framework providing simple and customizable markdown parsing.
MIT License
254 stars 66 forks source link

Add image scaling #8

Closed AliceAponasko closed 6 years ago

AliceAponasko commented 6 years ago

Issue Link :link:

https://github.com/chrisdhaan/CDMarkdownKit/issues/7

Goals :soccer:

Add image scaling for larger images to fit.

Implementation Details :construction:

Add an optional frame element, if set adjust attachment bounds to that frame's width.

Testing Details :mag:

No tests were added.

chrisdhaan commented 6 years ago

@AliceAponasko I like this approach. Just want to point out that it looks like this will set the frame for every image parsed by the framework. Is that the attended functionality or were you looking for a case by case frame basis on the images?

AliceAponasko commented 6 years ago

I was looking to set it on every image if needed! In case the frame parameter is not provided it will be the default attachment frame.

chrisdhaan commented 6 years ago

I see why this is failing. I'll update and merge in today.

chrisdhaan commented 6 years ago

@AliceAponasko I've made the necessary changes so that this work will build for all OS types. Unless I hear back with reasons to keep the changes I commented on I'm going to continue without them. I just need to test and will merge in tonight.

chrisdhaan commented 6 years ago

@AliceAponasko I've pushed up new commits that implement the requested functionality. I believe this PR can be closed out and the related issue if you have no objections.

chrisdhaan commented 6 years ago

This functionality in this PR has been implemented. Closing.