Skip to content

Conversation

@azone
Copy link
Contributor

@azone azone commented Oct 31, 2017

Fixes #796

To test:

Insert image or video into block-quote

Copy link
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

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

The changes look good in but can you clarify the questions I left in the comments.


padding += headIndent

if paragraphStyle.tailIndent > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain why do we need this IF, in what scenarios the tailIdent can be positive or negative?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is Discussion of tailIndent from apple:

If positive, this value is the distance from the leading margin (for example, the left margin in left-to-right text). If 0 or negative, it’s the distance from the trailing margin.

For example, a paragraph style designed to fit exactly in a 2-inch wide container has a head indent of 0.0 and a tail indent of 0.0. One designed to fit with a quarter-inch margin has a head indent of 0.25 and a tail indent of –0.25.

Copy link
Contributor

@SergioEstevao SergioEstevao Nov 7, 2017

Choose a reason for hiding this comment

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

So could we rewrite like this:
padding += abs(paragraphStyle.tailIndent) + abs(headIndent)

@diegoreymendez diegoreymendez added this to the Next Stable milestone Nov 7, 2017
@jleandroperez
Copy link
Contributor

Closing in favor of #828.

Thanks a lot sir!!

@diegoreymendez
Copy link
Contributor

@jleandroperez - Just double checking... this is the issue and #828 is the PR for this report. Is that correct?

@jleandroperez
Copy link
Contributor

@diegoreymendez Nope! #796 is the issue. #828 is Sergio’s fix Mark II, while this one is the original PR (AKA Fix Mark I).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants