I found that 4 space before the two texts allows the numbers to continue
Not exactly.
Four spaces before the two text lines makes that text part of the preceding list element:
1. Idea 1
2. Idea 2
Idea 2, continued.
Since the list is still open, another list item continues numbering automatically.
However, if your text isn't really a continuation of Idea 2 it probably should not be indented.
In Markdown, lists are automatically renumbered. I usually write
1. Foo
1. Bar
so I don't have to worry about fixing numbers if I want to add something to the list. Markdown will render it as
- Foo
- Bar
However, GitHub Flavored Markdown, CommonMark, and others commonly do respect the first number in a list. Let's see what happens here:
5. Foo
1. Bar
This becomes
- Foo
- Bar
where the 5. is taken from my explicit numbering and the 6. continues from that point, even though I used 1. in the source.
I don't know if this will work in PyCharm, but for GitHub your example should work almost out of the box:
1. Idea 1
2. Idea 2
''' Some txt '''
3. Idea 3
4. Idea 4
''' Or some other text '''
3. Other Idea 3
4. Other Idea 4
I just changed the 1) format to 1. The 2. and the two 4.s can be any number, but the 1., and the two 3.s indicate the number each list should start on.