Skip to content

Commit

Permalink
fix: no column
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <[email protected]>
  • Loading branch information
gfanton committed Feb 20, 2025
1 parent 5a34f90 commit 07c7ff6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion gno.land/pkg/gnoweb/markdown/ext_column.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,12 @@ func columnRender(w util.BufWriter, _ []byte, node ast.Node, entering bool) (ast
fmt.Fprintln(w, "<div>")

case ColumnTagClose:
fmt.Fprintln(w, "</div>\n</div>")
prev, ok := cnode.PreviousSibling().(*ColumnNode)
if !ok || prev.Tag != ColumnTagOpen {
fmt.Fprintln(w, "</div>")
}

fmt.Fprintln(w, "</div>")

default:
panic("invalid column tag - should not happen")

Check warning on line 267 in gno.land/pkg/gnoweb/markdown/ext_column.go

View check run for this annotation

Codecov / codecov/patch

gno.land/pkg/gnoweb/markdown/ext_column.go#L266-L267

Added lines #L266 - L267 were not covered by tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
-- output.html --
<div class="gno-cols">
</div>
</div>

0 comments on commit 07c7ff6

Please sign in to comment.