quarto markdown list and blank line

I wonder how I could remove the blank line indicated below by the in red arrow. Thanks.

Markdown:

### Part 5
* unordered list
    + sub-item 1
    + sub-item 2
        - sub-sub-item 1
    + sub-time 3
* unordered list
* unordered list

output rendered
quarto_blank_line

I don't seem to be able to duplicate this.

Maybe try a clean document and see if it still occurs?

Using RStudio (2022.12.0 Build 353), I created a new Quarto Document (File -> New File -> Quarto Document...), appended the same markdown segment to the default .qmd file, and I got the exact same problem.

Weird. Here is my code

---
title: "Exercise 2"
author: "John"
date: "`r Sys.Date()`"
date-format: iso
number-sections: true
format: pdf
header-includes:
  - \usepackage{lipsum}
  - \usepackage{sectsty} \allsectionsfont{\centering}
editor: visual
bibliography: Roman.bib
csl: apa.csl
---

It was a dark and stormy night.

### Five

-   item 1
    -   sdh
    -   tthd
        -   ndh
    -   sitem
-   item

### Six
* unordered list
    + sub-item 1
    + sub-item 2
        - sub-sub-item 1
    + sub-time 3
* unordered list
* unordered list

I forgot to say that I am rendering the Quarto file to html output. Code below (test.qmd).

---
title: "test"
format: html
editor: visual
---

### Part 5
* unordered list
    + sub-item 1
    + sub-item 2
        - sub-sub-item 1
    + sub-time 3
* unordered list
* unordered list

I can duplicate it when rendering to html.

You may have found a new bug.

As an afterthought:
Quarto v1.2.280
RStudio 2022.07.2+576 "Spotted Wakerobin"
R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

There is also another strange blank line behavior. See below. Adding a blank line in markdown between the first and second unordered list will introduce a blank line between the second unordered list and its sub-item 1.

---
title: "test"
format: html
editor: visual
---

### Part 5

* unordered list
* unordered list
    + sub-item 1
    + sub-item 2
        - sub-sub-item 1
    + sub-time 3
* unordered list
* unordered list

The above gives,

---
title: "test"
format: html
editor: visual
---

### Part 5

* unordered list

* unordered list
    + sub-item 1
    + sub-item 2
        - sub-sub-item 1
    + sub-time 3
* unordered list
* unordered list

The above gives,

I think you have a bug.

You can change this using a different CSS than the default. Here is an example theme file to use

format: 
  html:
    theme: 
      - styles.scss
/*-- scss:defaults --*/

/*-- scss:rules --*/

main {
  ol ol,
  ul ul,
  ol ul,
  ul ol {
    /* remove margin bottom under nested list item */
    margin-bottom: unset;
  }
  ul p {
    /* remove margin under paragraph inside list */
    margin-bottom: 0.2rem;
  }
}

Regarding bug or not, this is a matter of default style. It could be by design (as done like this since a long time) but can be revisited too. I would open an issue or discussion in https://github.com/quarto-dev/quarto-cli/ so that we can discuss with the dev team.

thanks

For reference, this was asked on Quarto repo

and this is now modified in the latest 1.3 pre-release version.

Thanks for reaching out to us !

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.