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

Request docs markdown: Bullet points missing when nesting in ordered list #5526

Closed
1 task done
leongzhiyong opened this issue Dec 15, 2022 · 5 comments · Fixed by #5630
Closed
1 task done

Request docs markdown: Bullet points missing when nesting in ordered list #5526

leongzhiyong opened this issue Dec 15, 2022 · 5 comments · Fixed by #5630
Labels
B-bug Bug: general classification N-investigation Needs: investigation S-unverified Status: Unverified by maintainer

Comments

@leongzhiyong
Copy link

leongzhiyong commented Dec 15, 2022

Expected Behavior

  1. Lorem ipsum
    • Dolor
    • Sit amet

Actual Behavior

  1. Lorem ipsum
        Dolor
        Sit amet

Reproduction Steps

  1. Create request

  2. Edit request docs

  3. Input following code

    1. Lorem ipsum
        - Dolor
        - Sit amet
    

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

2022.6.0

What operating system are you using?

Windows

Operating System Version

Windows 10 version 22H2

Installation method

Installer from imsomnia.rest

Last Known Working Insomnia version

No response

@leongzhiyong leongzhiyong added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Dec 15, 2022
@ryuusama09
Copy link

hey @leongzhiyong , I have the same version and windows operatig system . But apparently iam not facing this issue :
image

@leongzhiyong
Copy link
Author

leongzhiyong commented Dec 15, 2022

hey @leongzhiyong , I have the same version and windows operatig system . But apparently iam not facing this issue : image

Your unordered bullet points are not nested.

Examples with nested bullet points (#1) vs unnested bullet points (#2)

image

image

Edit:
Looks like copying the code block from the instruction set leaves out the leading spaces.

@leongzhiyong
Copy link
Author

@ryuusama09 I've updated the code block so that copying from it will properly replicate the issue. Thanks.

@ryuusama09
Copy link

ryuusama09 commented Dec 15, 2022

@ryuusama09 I've updated the code block so that copying from it will properly replicate the issue. Thanks.

alright thanks , now got that issue 👍

@filfreire filfreire added the N-investigation Needs: investigation label Dec 15, 2022
@paoloose
Copy link
Contributor

paoloose commented Jan 7, 2023

The bug seems to be in the list's combinator inside packages/insomnia/src/ui/css/components/markdown-preview.less

.markdown-preview__content {
// ...
  & > ul {
    list-style: disc;

    ul {
      list-style: circle;
    }
  }

  & > ol {
    list-style: decimal;

    ol {
      list-style: lower-alpha;
    }
  }
// ...
}

The > combinator will only match the ul and li that are first descendants of the container.

Since in packages/insomnia/src/ui/css/reset.less

ol, ul {
  list-style: none;
}

all the list-styles are set to none, in the example that @leongzhiyong provides:

1. Lorem ipsum  // <-- first descendant, so will have `list-style` set to `decimal`
    - Dolor     // <-- NOT first descendant, so the CSS rule will not apply and will have `list-style: none`
    - Sit amet

Another example:

1. Lorem ipsum  // <-- first descendant, so will have `list-style` set to `decimal`
    1. Dolor     // <-- NOT first descendant, but it's a descendant of the first descendant, so will have `list-style: lower-alpha`
    2. Sit amet

Note in the CSS rules that the "descendants of a first descendant" need to be of the same type (ul or ol), that's why the bug only occur when they are different types of lists.

Removing these combinators will fix it. I will make a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification N-investigation Needs: investigation S-unverified Status: Unverified by maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants