Skip to content

algo indent guides break for line-wrapped text #9

@platformer

Description

@platformer

In algo, if the text on a particular row line wraps, the indent guides for that row will not extend far enough.

#algo(
  title: "Floyd-Warshall",
  parameters: ("V", "E", "w"),
  indent-guides: 1pt + black,
)[
  Let $"dist"[u,v] <- infinity$ for $u,v$ in $V$\
  For $(u,v)$ in $E$:#i\
    $"dist"[u,v] <- w(u,v)$ #comment[edge weights] #d\
  For $v$ in $V$:#i\
    $"dist"[v,v] <- 0$ #comment[base case] #d\
  \
  For $k <- 1$ to $|V|$:#i\
    For $i <- 1$ to $|V|$:#i\
      For $j <- 1$ to $|V|$:#i\
        #comment(inline: true)[if new path is shorter, reduce distance]\
        If $"dist"[i,j] > "dist"[i,k] + "dist"[k,j]$:#i\
          $"dist"[i,j] <- "dist"[i,k] + "dist"[k,j]$\
          blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah#d#d#d#d\
  \
  Return $"dist"$
]

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions