Zettlr / Zettlr

Your One-Stop Publication Workbench
https://www.zettlr.com
GNU General Public License v3.0
10.21k stars 626 forks source link

Snippets that duplicate themselves cannot handle accented characters (e.g. 'é') #5222

Open furnacewriter opened 3 months ago

furnacewriter commented 3 months ago

Description

When using a snippet such as

---
title: "${1:Enter a Title}"
date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE
id: $ZKN_ID
---
# ${1:Enter a Title}
#$2
$0

When filling up the part noted by ${1}, if I write an accented character such as é, it will be properly written in the YAML part, but not in the H1 part. This results in the accent being pushed to the end (see screenshots attached). Screenshot 1 Screenshot 2

Reproducing

To reproduce the bug create and use the snippet described above, then attempt to insert an accented special character while writing the title in the YAML section. It should not be properly written down in the H1 section.

Zettlr Version

Stable (most recent version)

Specify version

3.1.1

Installation Method

None

Your Platform

Architecture

Operating System Version

Kubuntu 24.04

Additional Information

No response

boring-cyborg[bot] commented 3 months ago

Thanks so much for opening up your first issue here on the repository! 🎉 We would like to warmly welcome you to the community behind the app! ☺️ We'll check in soon and have a look at your issue. In the meantime, you can check your issue and make sure it aligns with our contribution guidelines! Here's the comprehensive list:

NOTE: Please do not share screen captures of buggy behavior on YouTube. If you have uploaded a video on YouTube and linked it already, don't worry! But, we would like to ask you to remove the video from YouTube and upload it directly to GitHub instead, by editing your comment. Read more here.

Enhancements

An enhancement takes a feature and improves or alters its behaviour. Please make sure to argue how your proposition will aid non-technical text workers, and why it can't be emulated easily with other features or apps!

Feature requests

Feature requests introduce whole new features into the app. This requires a lot of work, so these might be turned down if the implementation costs supersede the benefits we expect to see from implementing it. Please do not be disappointed if that happens. It likely has nothing to do with your great request but simply with us and our missing resources!

You can of course always ask someone to implement this feature, because a PR with a working new feature has much higher chances of being merged! :)

Bug reports

Please note that one of the main reasons for why bug reports cannot be addressed is that there's not enough information for us to find and fix the bug you describe, so make sure you try to pinpoint the bug as close as possible.

The ideal bug report for us has two qualities:

  1. The bug is always reproducible, at least within a certain context.
  2. We know exactly what specifically goes wrong, and there is consensus on what should happen instead.

Please note that if you encounter behaviour that does not align with your expectations of what would happen, this might as well be simply intended behaviour and we need to simply clarify why the behaviour is the way it is. This is not to be considered a bug and such issues may be closed! Suggest an enhancement instead!

But now, have a great day and thank you again!

lcsolano commented 3 months ago

I confirm this happens to me in Linux, but not in windows; just in case this can be of help.

nathanlesage commented 3 months ago

I have noticed this myself, but I can't influence it. It also happens when you manually create two cursors. If I remember correctly, this is due to how European keyboards handle accent characters: https://en.wikipedia.org/wiki/Dead_key

nathanlesage commented 3 months ago

Update: Just tested it with the minimal sandbox and there it worked, so it's an issue on our side. Apologies.