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

[BUG]: Incorrect syntax highlighting #2214

Open
r-barton opened this issue Apr 23, 2024 · 1 comment
Open

[BUG]: Incorrect syntax highlighting #2214

r-barton opened this issue Apr 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@r-barton
Copy link

The syntax highlighting in some scenarios is broken

In this first example edge4 should be highlighted green like edge1-3

// define a rectangular shape func
fn rectShape = (pos, w, l) => {
  const rr = startSketchOn('xy')
    |> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
    |> lineTo([pos[0] + w / 2, pos[1] - (l / 2)], %, "edge1")
    |> lineTo([pos[0] + w / 2, pos[1] + l / 2], %, "edge2")
    |> lineTo([pos[0] - (w / 2), pos[1] + l / 2], %, "edge3")
    |> close(%, "edge4")
  return rr
}

image

In this example edge8 should be highlighted

// build the bracket sketch around the body
fn bracketSketch = (w, d, t) => {
  const s = startSketchOn({
         plane: {
           origin: { x: 0, y: length / 2 + thk, z: 0 },
           x_axis: { x: 1, y: 0, z: 0 },
           y_axis: { x: 0, y: 0, z: 1 },
           z_axis: { x: 0, y: 1, z: 0 }
         }
       })
    |> startProfileAt([-w / 2 - t, d + t], %)
    |> lineTo([-w / 2 - t, -t], %, "edge1")
    |> lineTo([w / 2 + t, -t], %, "edge2")
    |> lineTo([w / 2 + t, d + t], %, "edge3")
    |> lineTo([w / 2, d + t], %, "edge4")
    |> lineTo([w / 2, 0], %, "edge5")
    |> lineTo([-w / 2, 0], %, "edge6")
    |> lineTo([-w / 2, d + t], %, "edge7")
    |> close(%, "edge8")
  return s
}

image

@r-barton r-barton added the bug Something isn't working label Apr 23, 2024
@jessfraz
Copy link
Contributor

yeah we use the js highlighter its easier at some point we can write our own

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants