Skip to content

code comments in preview mode not working well #1

@Inbydev

Description

@Inbydev

I wrote this in the <textarea>:

html {
    font-size: 16px; /* por defecto son 16 píxeles */
}

header {
    font-size: 20px;
    width: 2rem;
}

and in the preview mode, its sees this:

imagen

if you can see, the code comment aren't working well, because its sees just the slash but not the asterisk.
This happen because this part of the preview__mode.js code:

htmlTexto = htmlTexto.replace(/\*(.+?)\*/g, '<i>$1</i>');

its replacing asterisks with HTML italic tags, including code snippets. However, I don't know how to exclude it from this replacement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions