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

codeBlockStyling.contentInset not respected #64

Open
loudmouth opened this issue Jul 6, 2018 · 2 comments
Open

codeBlockStyling.contentInset not respected #64

loudmouth opened this issue Jul 6, 2018 · 2 comments
Labels

Comments

@loudmouth
Copy link
Contributor

👋

When doing something like this:

let styling = DefaultStyling()
styling.codeBlockStyling.contentInsets = UIEdgeInsets(top: 5.0, left: 15.0, bottom: 5.0, right: 15.0)

and then applying that styling, I have noticed that the contentInsets aren't rendered. Other attributes of codeBlockStyling are rendered properly.

@Basca
Copy link
Contributor

Basca commented Jan 20, 2019

Hey @loudmouth
Under the assumption that you tried to update a styling after setting the text on a MarkDownTextView.
I made the fix: #79

The MarkDownTextView wasn't designed to allow the whole styling to be updated after initialisation, the properties on it however are.

If this isn't your issue, could you provide some more context?
Are you using the MarkDownConfiguration .view or .attributedString
Can you provide more insight on when you are setting the styling and a sample of the markdown your are using creates this contentInsets issue?

@Basca
Copy link
Contributor

Basca commented Jan 20, 2019

As addition, the contentInsets are correctly rendered as far as I can see. But they might work differently than you expect.

The code block styling insets will modify the insets of the text within the gray box, but not the box itself. Do you expect the whole gray box to be inset?

@Basca Basca added the bug label Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants