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

Punctuation-preceded backticks don't visually format when typed #5483

Open
strugee opened this issue Mar 14, 2024 · 1 comment
Open

Punctuation-preceded backticks don't visually format when typed #5483

strugee opened this issue Mar 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working upstream

Comments

@strugee
Copy link
Member

strugee commented Mar 14, 2024

Describe the bug

Backticks aren't turned into code formatting when preceded by a punctuation character. For example typing this:

(`foobar`

does not result in code formatting being applied.

To Reproduce
Steps to reproduce the behavior:

  1. Open a Text document and start editing it.
  2. Type ( and then backtick.
  3. Type anything (say foobar) then backtick.
  4. Notice how nothing happens, and you still see literal backticks in your document. (The same is true if you click "Done" and then go back to editing.)

Expected behavior
foobar is formatted as code.

Screenshots

image

Server details:

  • Nextcloud version: 28.0.2
  • PHP Version: 8.1.27
  • Database: 5.7.44-48-log (I know it's unsupported but it's out of my control this seems unrelated)

Client details:

  • OS: Linux
  • Browser: Firefox
  • Browser version: 122
  • Device: desktop

Nextcloud log (data/nextcloud.log)

N/A

Browser log

Nothing at all in the JS console.

@strugee strugee added the bug Something isn't working label Mar 14, 2024
@mejo- mejo- self-assigned this Mar 19, 2024
@mejo- mejo- added the upstream label Mar 19, 2024
@mejo-
Copy link
Member

mejo- commented Mar 19, 2024

This should be fixed upstream in tiptap. Probably easy to fix here by adding ( to the lookbehind assertion at the beginning of the regex:

https://github.com/ueberdosis/tiptap/blob/48935a2f26e3da2fa13c265773dfe259893829cc/packages/extension-code/src/code.ts#L31-L32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
Status: 🧭 Planning evaluation (don't pick)
Development

No branches or pull requests

2 participants