Skip to content

Underline style in MarkdownStyleEmphasisSingle not honored without significant change in MarkdownStyleEmphasisDouble #11

@igz

Description

@igz

Setting NSUnderlineStyleAttributeName in MarkdownStyleEmphasisSingle only seems to work if MarkdownStyleEmphasisDouble is defined as well that contains a significant attributed style difference.

Use case underlining "bar" in "Foo bar".

Using SampleApp's ViewController, and enabling USE_STYLE_ATTRIBUTES, I would expect the following style attributes to work:

@{
        MarkdownStyleEmphasisSingle: @{
            NSUnderlineStyleAttributeName: @1
        }
}

However, this is insufficient to underline "bar" in the example. In order for the single emphasis style to take effect, one needs to add a MarkdownStyleEmphasisDouble definition, which has a significant difference from the base attributes (font, foregroundColor, underline style all seem to do the trick).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions