Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow disabling indented code blocks. #2072

Open
RokeJulianLockhart opened this issue Nov 23, 2024 · 0 comments
Open

[Feature Request] Allow disabling indented code blocks. #2072

RokeJulianLockhart opened this issue Nov 23, 2024 · 0 comments
Assignees

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Nov 23, 2024

Is your feature request related to a problem? Please describe.

I author most of my markup in HTML, because it provides significantly more versatile and semantic markup capabilities. However, it has an (ultimately non-inherent, but in-practice) significant failure — <code> tags are not automatically syntax-highlighted by any parsers.

Markdown, being a superset of HTML, improves this perfectly. As an example, when I render the undermentioned in VS Code with the PowerShell extension installed, I see beautiful colours:

<tr>
<th>
Construction
</th>
<td>

```PS1
${'Status'} = [PSCustomObject]@{
    'Non-Chronological' = 'Indeterminate';
    'Chronological' = [PSCustomObject]@{
        1 = @(
            'Uncommenced',
            'Commenced'
        );
        2 = @(
            'Completed',
            'Cancelled'
        )
    }
}

${'Person'} = [PSCustomObject]@{
    3 = '';
    1 = '';
    2 = ''
}
```

</td>
</tr>

However, that's really difficult to read. It gets exponentially more difficult if, for example, you have nested tables with code blocks in each. At that stage, I basically have to re-indent and then de-indent each time I modify the markup. It's a dreadful workflow.

Describe the solution you'd like

Instead, it should be the undermentioned:

<tr>
    <th>
        Construction
    </th>
    <td>
        ```PS1
        ${'Status'} = [PSCustomObject]@{
            'Non-Chronological' = 'Indeterminate';
            'Chronological' = [PSCustomObject]@{
                1 = @(
                    'Uncommenced',
                    'Commenced'
                );
                2 = @(
                    'Completed',
                    'Cancelled'
                )
            }
        }

        ${'Person'} = [PSCustomObject]@{
            3 = '';
            1 = '';
            2 = ''
        }
        ```
    </td>
</tr>

Describe alternatives you've considered

The sole alternative is to remove all line breaks.

Additional context

Quotations are from microsoft/vscode#234485 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants