Skip to content

Annotation brackets do not span correctly #140

Description

@JuliusFreudenberger

When adding annotations over multiple lines, the brackets start to not span across all of them.
This is especially noticeable when annotations span 20 lines or so.

I created this reproducer which clearly shows the problem I have, I tested against current main (ece8099). The box for the annotations even span correctly, it is just the bracket, which does not reach to the ends completely.

Image
#import "./codly/codly.typ": *
#import "@preview/codly-languages:0.1.1": *

#show: codly-init.with()
#codly(languages: codly-languages)

#figure(caption: [Reproducer])[#codly(annotations: (
    (
      start: 2,
      end: 2,
      content: block(
        width: 8em,
        [Annotation 1],
      ),
    ),
    (
      start: 3,
      end: 25,
      content: block(
        width: 8em,
        [Annotation 2],
      ),
    ),
    (
      start: 27,
      end: 41,
      content: block(
        width: 8em,
        [Annotation 3],
      ),
    ),
  ))]
    ```python
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    line
    ```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions