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

Doesn't work for some markdown elements #6

Open
shmerl opened this issue Nov 21, 2019 · 2 comments
Open

Doesn't work for some markdown elements #6

shmerl opened this issue Nov 21, 2019 · 2 comments

Comments

@shmerl
Copy link

shmerl commented Nov 21, 2019

For example:

* test

Will turn into

  • test

And when editing, it won't revert to raw markdown.

@shmerl
Copy link
Author

shmerl commented Nov 21, 2019

Actually, it's a bit worse. After activating the fix, bullet syntax stops working altogether on second try.

@kfahy
Copy link
Owner

kfahy commented Nov 21, 2019

Oof, good find, @shmerl! I hadn't noticed this bullet behavior before, but I also reproduced in a workspace that hasn't yet been migrated to WYSIWYG, so perhaps this rollout was independent.

Don't have time to dig into this now, but from a quick glance of the Slack JS it looks like the bullet conversion might be happening in the following block:

return t[0].elements.forEach(e=>{
    if (e && e.type)
        if (e.type === p.a.LIST) {
            let t = 1;
            e.elements.forEach(n=>{
                const a = r(n);
                "ordered" === e.style ? (i.push(`${t}. ${a}`),
                t += 1) : i.push(`\u2022 ${a}`)
            }
            )
        } else
            i.push(r(e))
}

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

2 participants