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

Bolding when selecting trailing whitespace does not work #767

Closed
cornercase opened this Issue Nov 6, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@cornercase

cornercase commented Nov 6, 2017

Expected behaviour

If text is selected with trailing whitespace and "Command+B" or "Command+I" is used to update formatting, the resulting markdown should exclude the trailing whitespace so that the markdown renders correctly.

Actual behaviour

Selecting a word with a trailing space and using "Command+B" or "Command+I" causes the markdown to be written as

**word **one rather than **word** one

Steps to reproduce

  1. Open QOwnNotes (found in many versions, including version 17.11.0 - Travis CI - build 3325) on MacOS Sierra
  2. Create a note, type a sentence
  3. navigate to the beginning of a word in the middle of the sentence. Hold down command and press the right arrow key. It should select the word and the trailing space.
  4. Press command+B.
  5. Notice the trailing space is inside the bold section, causing the rendering to fail.

Probably substitute control for command on windows.

Output from the debug section in the settings dialog

Relevant log output (you have to enable enable the log widget)

@pbek pbek added the enhancement label Nov 6, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Nov 6, 2017

Thank you for your suggestion.

@pbek pbek added this to the 17.11.2 milestone Nov 16, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Nov 16, 2017

17.11.2

  • when formatting bold or italic now leading and trailing spaces in the selected
    text will be placed before and after the formatting markers to prevent
    malformed markdown code
@pbek

This comment has been minimized.

Owner

pbek commented Nov 16, 2017

There now is a new release, could you please test it and report if it works for you?

@pbek pbek closed this Nov 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment