Indented paragraphs #5750
|
I really appreciate this markdown editor, thank you, but I have a question. I wrote a few paragraphs starting with an indented tab. If I attempt to edit those paragraphs, they are enclosed in what appears to be a code block. At the top there is a text-input asking for the specific language being used. There does not seem to be a way to get rid of this without deleting the tab and then re-inputting the tab. Is this the desired behavior or a bug? |
Replies: 1 comment 1 reply
|
This is expected Markdown behaviour, not a MarkText bug. In Markdown (CommonMark/GFM), a line that starts with a tab or 4+ spaces, when it isn't inside a list, is an indented code block (CommonMark spec). MarkText follows the spec, so it shows those paragraphs as code; that's what the "language" box is for. Other Markdown viewers (GitHub, VS Code, etc.) render them as code too. Markdown has no syntax for first-line paragraph indentation, but there are a few ways to get the look you want: 1. Use space entities instead of a tab   This paragraph starts with an indent and stays a normal paragraph.
2. Use the full-width space character ( 3. Keep the Markdown clean and indent only when exporting To fix the existing paragraphs: put the cursor at the start of the text inside the code block and delete the leading tab, or convert the block back to a normal paragraph from the Paragraph menu. Then use one of the options above. |
This is expected Markdown behaviour, not a MarkText bug. In Markdown (CommonMark/GFM), a line that starts with a tab or 4+ spaces, when it isn't inside a list, is an indented code block (CommonMark spec). MarkText follows the spec, so it shows those paragraphs as code; that's what the "language" box is for. Other Markdown viewers (GitHub, VS Code, etc.) render them as code too.
Markdown has no syntax for first-line paragraph indentation, but there are a few ways to get the look you want:
1. Use space entities instead of a tab
  This paragraph starts with an indent and stays a normal paragraph. is an "em space" (entity references); two of them look like a tab. …