Skip to content

Superscript/Subscript Buttons Should Handle Spaces #3726

@cjc343

Description

@cjc343

Requirements

  • This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
  • Please check to see if this issue already exists.
  • It's a single bug. Do not report multiple bugs in one issue.
  • It's a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.

Summary

When you select a sentence and press the superscript or subscript buttons, it creates markdown like:

^A sentence with spaces^ or ~A sentence with spaces~

These do not render properly. Instead, spaces should be handled either by escaping them (preferable IMO):

^A\ sentence\ with\ spaces^

Or skipping them:

^A^ ^sentence^ ^with^ ^spaces^

Steps to Reproduce

  1. Start writing a post/comment
  2. Select text with a space included
  3. Press either the superscript or subscript button in the formatting panel

Technical Details

Not relevant, this issue occurs regardless of device or browser because the generated HTML does not format the text as desired.

Lemmy Instance Version

BE: 0.19.15, FE text not currently displayed?

Lemmy Instance URL

https://lemmy.ml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions