How To Avoid Auto-Formatting in .md Files?

I want to write a simple diary as a .md file in the folder Documents of my NC. But it’s annoying. Every day, when I want to enter the date of the day as a new line, NC transforms this line as an item of a imaginary numbered list. When I click above on the button in order to deactivate the numbered list formatting the numer of the date is vanishing.

How can I avoid this behaviour?

I want that 4. Mai 2023 remains as 4. Mai 2023 but will not be transformed into the imaginary item No. 4 of a numbered list.

I don’t think you can turn it off.

As an immediate workaround you could either format the date as a title or choose a different date format such as 04.05.2023

For the longer term:

Create an issue / feature request on Github in which you request to be able to configure or disable the auto-format features.

Since it is markdown (like here in this forum) you could do different things:

hit enter twice, so the numbered item stays at its own:

04. Mai 2023

which looks like:

  1. Mai 2023

Lorem ipsum dolor sit amet, consectetur adipisici elit, …


create for every day an unsorted list with only one item:

- 04. Mai 2023

which looks like:

    1. Mai 2023

Lorem ipsum dolor sit amet, consectetur adipisici elit, …


put it between backticks:

`04. Mai 2023`

which looks like:
04. Mai 2023
Lorem ipsum dolor sit amet, consectetur adipisici elit, …


I hope you like one of these solutions.
Of course you should try how it looks in the editor with your style, but personally I kind of like all of them

1 Like

Addition / correction of my previous post:

In this case, there is nothing that could be done to disable “auto-formating”, because 1 or any number followed by a . is the actual Markdown syntax for Numbered Lists, so the only way to prevent this from happening is to use a “workaround” like the ones posted by me and @ernolf

@vatolin: I just created a new md file on NC 26.0.1 and entered “4. Mai 2023” as mentioned in your example and nothing changes by itself (no numbered item is created… just the plain text). Closing and opening the file does also not change anything.

Which nextcloud version are you using?

Did you actually type it in, or did you paste it in?

For me it only happens when I actually type 4.SPACE. It doesn’t happen when I paste the complete date at once. I’m using Nextcloud 26.0.1 with Text 3.7.2.

That’s my setup too. And it behaves exactly as yours.

That’s an easy to use work-a-round, right?
Of course someone could create a bug report, if required.

Yes, definitley :slight_smile:

That’s was my first thought too. But any number.SPACE is actually the official markdown syntax for numbered lists, so I don’t think the devs should change anything here.

It is not a bug, it is a designed feature.

You can edit it in Plain text editor (files_texteditor) if you dont like the markdown behaviour.

When installed, you can choose “Edit in plain text editor” via context menu or the three dots.