Skip to content

source code is modified when switching source code mode #2171

Closed

Description

@aisbergde

Description

marktext changes the source code when switching source code mode

  • Can you reproduce the issue?

Steps to reproduce

In source code mode use this text (2 spaces at the end of each line)

* abc  
** def  
† asd  
†† qwet

toggle the source code mode, toogle back, marktext will change the source code:

* abc  
  ** def  
  † asd  
  †† qwet

Expected behavior:

marktext should not manipulate my source code, when I switch

Actual behavior:

marktext manipulates and changes the source code

Link to an example: [optional]

Versions

  • Mark Text: 0.16.1
  • Operating system: Windows 10

Activity

  1. fxha commented on Jun 4, 2020

    @fxha
    Contributor

    Thank you for taking the time to report this issue! Unfortunately, this is the expected behaviour as * is a list marker like -. You could escape the character with a backslash like \*.

    E.g. GitHub (GFM):

    • abc
      ** def
      † asd
      †† qwet
  2. aisbergde commented on Jun 4, 2020

    @aisbergde
    Author

    you are right in terms of syntax, and that is the point.
    The major issue is: marktext changes text without my permission, not asking me.

    That is the worst what an editor can do: When I use Word or some similar with auto correction I can reject the auto correction. But I can't reject marktext auto correction. And this is "no go" for me and it would prevent me to use marktext as default editor for any markdown files because I should be afraid that some "marktext thinks it is incorrect text" will be corrected.

    It would be great when marktext will hint me about syntax issues, and if it will even suggest me to change, also some "auto correction under my control" would be fine.

    But it must be possible to disable auto correction. Otherwise how to "view only" files?

    Please reopen the issue. It is a major issue and major feature request, to prevent auto correction. You can rename the issue.

  3. fxha commented on Jun 6, 2020

    @fxha
    Contributor

    marktext changes text without my permission, not asking me.

    Please see #2189.

  4. added
    🐛 bug
    🪲 pri/major
    on May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 pri/major🐛 bug🔭 area/editor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions