johnxnguyen / Down

Blazing fast Markdown / CommonMark rendering in Swift, built upon cmark.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DownStylerConfiguration Link Color Not Working

francescopetrungaro opened this issue · comments

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 have used your iOS example code to build a custom style but unfortunately the link color is not changing.

I replaced the content of renderDownInWebView with this

let downView = DownTextView(frame: view.bounds)
let down = Down(markdownString: readMeContents)
let styler = DownStyler(configuration: .testConfiguration)
downView.attributedText = try! down.toAttributedString(styler: styler)

and I am using the DownStylerConfiguration testConfiguration from your test suite.

What did you expect to happen?

In the configuration link color is set as

colors.link = .red

so it should show red links

What happened instead?

it does not show as red but as default blue

Simulator Screen Shot - iPhone 11 Pro Max - 2020-10-20 at 18 23 49

Thanks

Hi @RedPlumber , thanks for the report. I can confirm the issue and know the cause. I'll push a fix when I have some time.

Closed via #233 ; will release a new version soon