Skip to content

Styling a element with several CSS classes #75

@existme

Description

@existme

Hi,
I am trying to use this in tui.editor within a Gollum installation, I have already written a render layer for Gollum which mimics markdown-it-attrs behaviors. Something that makes me wonder is some inconsistencies when having several classes on an element.

Example input:

1.this is the markdown I'm trying to parse {.note .green}
2.this is the markdown I'm trying to parse {.note.green}

Current output:

<p class="note green">1.this is the markdown I'm trying to parse</p>
<p>2.this is the markdown I'm trying to parse</p>

Expected output:

<p class="note green">1.this is the markdown I'm trying to parse</p>
<p class="note green">2.this is the markdown I'm trying to parse</p>

Won't you agree that both should render the same way? I mean why not allowing the shorthand .warning.green instead of .warning .green? and why it completely eats .note.green?

Thanks
/Reza

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