typora-issues
typora-issues copied to clipboard
Wrong indentation in code block in blockquotes
I write a code block in a blockquote like this:
> See [**PEP 695**](https://docs.python.org/zh-cn/3/whatsnew/3.12.html#pep-695-type-parameter-syntax).
>
> ```python
> def max[T](args: Iterable[T]) -> T:
> ...
>
> class list[T]:
>
> def __getitem__(self, index: int, /) -> T:
> ...
>
> def append(self, element: T) -> None:
> ...
> ```
The code block GitHub rendered like this:
See PEP 695.
def max[T](args: Iterable[T]) -> T: ... class list[T]: def __getitem__(self, index: int, /) -> T: ... def append(self, element: T) -> None: ...
but I got different rendered result in Typora:
def max[T](args: Iterable[T]) -> T:
...
class list[T]:
def __getitem__(self, index: int, /) -> T:
...
def append(self, element: T) -> None:
...
To Reproduce Steps to reproduce the behavior:
- Copy the above markdown code into Typora at source code mode.
- Exit source code mode.
Screenshots / Screencasts
Desktop
- OS: Windows 11 64bit
Typora Version 1.8.10 for Windows (x64)
Additional context I have never tried this before, so I don't know if it can be reproduced with older versions.
I am facing the same problem. When I use Typora to take notes, I can ensure that the indentation of the code I copy is normal. But after a period of time, some of the indentation in the code was magically modified. But I am currently unable to confirm what operation caused the change in code indentation.