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

Copying a single line in a document will incorrectly select all #18501

Closed
1 of 4 tasks
thinkasany opened this issue Oct 29, 2024 · 1 comment
Closed
1 of 4 tasks

Copying a single line in a document will incorrectly select all #18501

thinkasany opened this issue Oct 29, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@thinkasany
Copy link
Contributor

thinkasany commented Oct 29, 2024

firefox

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

I want to copy a single line of code, and as soon as I start copying this line, all the lines are selected.

20241029103309_rec_

Your Suggestion for Changes

A single line can be copied normally.

Reproduction

https://vite.dev/config/

Steps to reproduce

const env = loadEnv(mode, process.cwd(), '')

import { defineConfig, loadEnv } from 'vite'

export default defineConfig(({ command, mode }) => {
  // Load env file based on `mode` in the current working directory.
  // Set the third parameter to '' to load all env regardless of the `VITE_` prefix.
  const env = loadEnv(mode, process.cwd(), '')
  return {
    // vite config
    define: {
      __APP_ENV__: JSON.stringify(env.APP_ENV),
    },
  }
})

I want to copy a single line of code const env = loadEnv(mode, process.cwd(), '') and as soon as I start copying this line, all the lines are selected.

@sapphi-red
Copy link
Member

It seems there's a bug (?) in vitepress-twoslash. I made a issue there: shikijs/shiki#822

@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants