Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

per-line highlight is wrong unless "display line numbers" is set #423

Closed
nmattia opened this issue Oct 20, 2019 · 1 comment · Fixed by #428
Closed

per-line highlight is wrong unless "display line numbers" is set #423

nmattia opened this issue Oct 20, 2019 · 1 comment · Fixed by #428
Labels
bug Something isn't working hacktoberfest-accepted Good for Hacktoberfest highlight-code Highlight code web component

Comments

@nmattia
Copy link
Contributor

nmattia commented Oct 20, 2019

Code to highlight:

# main.tf

resource "aws_lambda_function" "api" {
  function_name = "deckdeckgo-handler-lambda"

  filename      = 
    data.external.build-function.result.path

  runtime = ...
}

data "external" "build-function" {
  program = [
    "nix",
    "eval",
    "(import ./default.nix).function-handler-path",
    "--json",
  ]
}

I set the line numbers to 6,7. When "display line numbers" is set, line 6 is highlighted. When it's unset, the highlight goes from the end (e.g. last char) of line 6 to line 10.

@peterpeterparker peterpeterparker added bug Something isn't working highlight-code Highlight code web component labels Oct 20, 2019
janscheidegger added a commit to janscheidegger/deckdeckgo that referenced this issue Oct 21, 2019
Wrap code in a div when line nubmers are turned off to ensure correct highlighting
janscheidegger added a commit to janscheidegger/deckdeckgo that referenced this issue Oct 21, 2019
Wrap code in a div when line nubmers are turned off to ensure correct highlighting
@peterpeterparker peterpeterparker added the hacktoberfest-accepted Good for Hacktoberfest label Oct 21, 2019
@peterpeterparker peterpeterparker added this to the studio-beta.8 milestone Oct 21, 2019
peterpeterparker added a commit that referenced this issue Oct 21, 2019
fix(#423): fix wrong code highlight when line numbers are off
@nmattia
Copy link
Contributor Author

nmattia commented Oct 21, 2019

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working hacktoberfest-accepted Good for Hacktoberfest highlight-code Highlight code web component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants