Marktext: Cannot search text which contains markup in the source

Created on 20 Nov 2019  路  3Comments  路  Source: marktext/marktext

Description

Either using global search (Ctrl+Shift+F) or local search (Ctrl+F) it's not possible to search and find a text which contains markup in the source.

  • [x] Can you reproduce the issue?

Steps to reproduce

  1. Enter the text e.g. "The brain research"
  2. Apply the markup e.g. "The brain research"
  3. Save the file
  4. Try to search for "The brain research"

image

Expected behavior:

The match should be found if the texts output looks as a whole, no matter if the source code contains markup.

Actual behavior:

There are no matches found.

Versions

  • Mark Text: 0.15.x and 0.16.x
  • Operating system: Win 8.1
馃敪 areeditor 馃敪 aremuya 馃 optimization

Most helpful comment

In my eyes when a user has thousands of files in his directory and wants to find something rather simple then they expect the correct result.
The lack of the correct result due to bold, italic or other formatting shenanigans creates poor user experience, especially because I don't know any text editor where the user actually must pay attention to that. Even if paying attention it's hard to know what you need to do to be able to find the text you need. Search without markup is a must, but if you're concerned try to offer both options and tracks which one users prefer

All 3 comments

Thank you for reporting the issue. I'm not sure if this should be the expected behavior because you/the user search for a given text that is not bold. Should we respect this or ignore all markdown formatting while searching.

In my eyes when a user has thousands of files in his directory and wants to find something rather simple then they expect the correct result.
The lack of the correct result due to bold, italic or other formatting shenanigans creates poor user experience, especially because I don't know any text editor where the user actually must pay attention to that. Even if paying attention it's hard to know what you need to do to be able to find the text you need. Search without markup is a must, but if you're concerned try to offer both options and tracks which one users prefer

I think that in WYSIWYG mode, Mark Text should search and find visible text, irrelevant of its markup. This is the common behavior of most text software (word processors, web browsers). Considering Mark Text actively tries to hide the markup whenever possible (everywhere except under the cursor), considering also that Mark Text provides enough icons and shortcuts that a user could conceivably not even know the markup, it seems quite disappointing that Mark Text requires users to specify markup when searching for a word, and possibly perform many different searches to find all the different ways one word could have been marked up...

One neat thing could be that in source code mode Mark Text allows to search including markup, while in WYSIWYG mode it allows to search independently of markup.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidmichaelhuber picture davidmichaelhuber  路  3Comments

CeroProgramming picture CeroProgramming  路  3Comments

cakkac picture cakkac  路  4Comments

jrobbins picture jrobbins  路  3Comments

1dancook picture 1dancook  路  3Comments