Skip to content

Conversation

@deathaxe
Copy link
Member

This commit backports sublimehq/Packages#4020 to ensure related indentation rules are correctly applied for ST4181+.

Scope changes are backported primarily due to their effect on syntax tests and the goal to avoid a need to ship dedicated ST4181+ releases just due to failing syntax tests, which do otherwise not have any significant effect on highlighting.

This commit backports sublimehq/Packages#4020
to ensure related indentation rules are correctly applied for ST4181+.

Scope changes are backported primarily due to their effect on syntax tests
and the goal to avoid a need to ship dedicated ST4181+ releases just due
to failing syntax tests, which do otherwise not have any significant effect
on highlighting.
In order to properly handle `<template>` tag indentation in combination
with script/style comment handling dedicated indentation rules are required.

This commit therefore backports and adjusts indentation rules from
sublimehq/Packages#4020
@deathaxe
Copy link
Member Author

Actually I am uncertain, whether we really need the complicated comment handling in <template> tags as it more or less targets script/style which content was wrapped in comments due to IE compatibility.

If we don't need it, we could probably simplify this PR and remove script/style related stuff in a following ST4126+ PR and let indentation be fixed by builtin HTML for ST4180+

This commit

1. removes special treatment of html comments wrapping template content
   as this is supported by browsers primarily for legacy code.

2. removes indentation rules and makes syntax tests more lazy to avoid
   them fail across various ST versions.

   As a result Vue completely relies on ST's indentation rules, which means
   it works best as of ST4180.
@deathaxe deathaxe merged commit dd9ca07 into main Nov 21, 2024
14 checks passed
@deathaxe deathaxe deleted the fix/indentation branch November 21, 2024 09:53
@FichteFoll FichteFoll added this to the 5.0.0 milestone Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants