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

Change @shikijs/transformers range by + 1 #619

Open
5 tasks done
richardgill opened this issue Mar 9, 2024 · 0 comments
Open
5 tasks done

Change @shikijs/transformers range by + 1 #619

richardgill opened this issue Mar 9, 2024 · 0 comments

Comments

@richardgill
Copy link
Contributor

Validations

Describe the bug

// [!code highlight:2]
console.log('highlighted')
console.log('not highlighted')

Ranges on transformations include the current line, to me this was very uninuitive.

Instead it could be:

// [!code highlight:2]
console.log('highlighted')
console.log('highlighted')

Currently: // [!code highlight] is effectively // [!code highlight:1]
Becomes: // [!code highlight:0]

I guess this is a breaking change, and it is slightly arbitary - so no worries if you disagree :)

Reproduction

Included in comment

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
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

No branches or pull requests

1 participant