Approval Queue: Code Block reset line return #229

Closed
opened 2024-08-01 15:30:16 +02:00 by Victor Chedeville · 2 comments

In the Approval Queue comment section, when using a code block at the beginning of a line, it moves the line to the end of the previous one.

For Example:

Line 01
`Line 02`
`Line 03`

Will be displayed:

Line 01 `Line02` `Line03`

Example: https://extensions.blender.org/approval-queue/node-editor-switcher/

In the Approval Queue comment section, when using a code block at the beginning of a line, it moves the line to the end of the previous one. For Example: ``` Line 01 `Line 02` `Line 03` ``` Will be displayed: ``` Line 01 `Line02` `Line03` ``` Example: https://extensions.blender.org/approval-queue/node-editor-switcher/
Victor Chedeville added the
Priority
Normal
Type
Report
labels 2024-08-01 15:30:16 +02:00

Same for:

'''
Line 01 
Line 02 
Line 03
'''

result in:

'''
Line 01 Line 02 Line 03
'''

name = "High Color"
tagline = "Colorful theme with high contrast colors"

result in:

name = "High Color" tagline = "Colorful theme with high contrast colors"

Same for: ``` ''' Line 01 Line 02 Line 03 ''' ``` _result in:_ ``` ''' Line 01 Line 02 Line 03 ''' ``` --- name = "High Color" tagline = "Colorful theme with high contrast colors" _result in:_ name = "High Color" tagline = "Colorful theme with high contrast colors"

@Victor-09 thank you for the report. Let me break down your comments to two subtopics:

  1. Inline code blocks and new lines
    Code that is added to Markdown like this: `code` is an inline element, and is not supposed to break into a new line. With current Markdown rendering, you can open a new line in one of these ways:
  • Adding two spaces at the end of the line, and then opening a new line.
  • Adding <br> at the end of the line, and then opening a new line.

In the above context, code tags are handled as any other inline elements.

  1. Multi-line code blocks and new lines
    You were correct that line breaks weren't preserved when rendering multi-line code blocks that were added between ``` lines. It was fixed, and line-breaks should now be rendered when writing code within these tags.
@Victor-09 thank you for the report. Let me break down your comments to two subtopics: 1. **Inline code blocks and new lines** Code that is added to Markdown like this: _\`code\`_ is an inline element, and is not supposed to break into a new line. With current Markdown rendering, you can open a new line in one of these ways: - Adding two spaces at the end of the line, and then opening a new line. - Adding `<br>` at the end of the line, and then opening a new line. In the above context, _code_ tags are handled as any other inline elements. 2. **Multi-line code blocks and new lines** You were correct that line breaks weren't preserved when rendering multi-line code blocks that were added between _\`\`\`_ lines. It was fixed, and line-breaks should now be rendered when writing code within these tags.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/extensions-website#229
No description provided.