1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #6778 open

Fenced code blocks inside list (BB-7955)

Dmitry Pashkevich
created an issue

The following works:

Unfenced code block with double indentation

  • List item

    .post-list li .author a,
    .post-list li .author a:hover {
        color: #F30;
        text-transform: uppercase;
    }
    
  • Another list item

However this doesn't work as expected

I want highlighting!

  • List item

    ```
    #!css
    
    .post-list li .author a,
    .post-list li .author a:hover {
        color: #F30;
        text-transform: uppercase;
    }
    ```
    
  • Another list item

Look here for reference: Fenced code blocks inside ordered and unordered lists

Comments (8)

  1. Rinat Akhmadeev

    You can use this for create code block in list:

    - List item:
    
            .post-list li .author a,
            .post-list li .author a:hover {
                color: #F30;
                text-transform: uppercase;
            }
    
    - Next list item
    

    Result:

    • List item:

      .post-list li .author a,
      .post-list li .author a:hover {
          color: #F30;
          text-transform: uppercase;
      }
      
    • Next list item

    But highlighting is wrong, and you can't choose Language.

    Another variant:

    - List item:
    
        ```css
        .post-list li .author a,
        .post-list li .author a:hover {
            color: #F30;
            text-transform: uppercase;
        }
        ```
    
    - Next list item
    

    Result:

    • List item:

      css .post-list li .author a, .post-list li .author a:hover { color: #F30; text-transform: uppercase; }

    • Next list item

    This works very wrong.

    Plase, fix it.

  2. Paul Melnikow

    Think I got this working. It doesn't work with fenced code blocks.

    1. Foo
    
            :::css
            .post-list li .author a,
            .post-list li .author a:hover {
                color: #F30;
                text-transform: uppercase;
            }
    
    2. Bar
    
            :::css
            .post-list li .author a,
            .post-list li .author a:hover {
                color: #F30;
                text-transform: uppercase;
            }
    
    1. Foo

      .post-list li .author a,
      .post-list li .author a:hover {
          color: #F30;
          text-transform: uppercase;
      }
      
    2. Bar

      .post-list li .author a,
      .post-list li .author a:hover {
          color: #F30;
          text-transform: uppercase;
      }
      
  3. Log in to comment