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

Incorrect result for string with mixed styles #97

Open
erychagov opened this issue Nov 10, 2020 · 0 comments
Open

Incorrect result for string with mixed styles #97

erychagov opened this issue Nov 10, 2020 · 0 comments

Comments

@erychagov
Copy link

erychagov commented Nov 10, 2020

Platform: iOS
Version: 1.2.3
Example: "~~_**Test**_~~"

How it looks here:
Test

How it looks after SwiftyMarkdown:
Test

NSAttributedString has next styles:

Test{
    NSColor = "<UIDynamicSystemColor: 0x7b1000083180; name = labelColor>";
    NSFont = "<UICTFont: 0x7b540056cc00> font-family: \"Times New Roman\"; font-weight: normal; font-style: normal; font-size: 17.00pt";
    NSParagraphStyle = "Alignment 4, LineSpacing 0, ParagraphSpacing 0, ParagraphSpacingBefore 0, HeadIndent 0, TailIndent 0, FirstLineHeadIndent 0, LineHeight 0/0, LineHeightMultiple 0, LineBreakMode 0, Tabs (\n    28L,\n    56L,\n    84L,\n    112L,\n    140L,\n    168L,\n    196L,\n    224L,\n    252L,\n    280L,\n    308L,\n    336L\n), DefaultTabInterval 0, Blocks (\n), Lists (\n), BaseWritingDirection -1, HyphenationFactor 0, TighteningForTruncation NO, HeaderLevel 0 LineBreakStrategy 0";
    NSStrikethrough = 1;
}

I guess the problem is here.
The code replaces the previous font style. The strikethroug is the latest what's why we always gets NSAttributedString with NSStrikethrough style.

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

No branches or pull requests

1 participant