• Open Bugs

  • Test Jumbotron

    Relative Link Test This is a relative Intra-Site link in a layout (see link)

    Test: Code blocks

    Normal fenced code should render correctly

    Content in a fenced code block
    

    With syntax coloring should render correctly

    <foo>
      <bar type="name">goo</bar>
    </foo>
    

    codeLineNumbers option in site.json should set the global code line numbers behavior (should show line numbers)

    <foo>
      <bar type="name">goo</bar>
    </foo>
    

    line-numbers class should show corresponding line numbers

    <foo>
      <bar type="name">goo</bar>
    </foo>
    

    no-line-numbers class should hide corresponding line numbers

    <foo>
      <bar type="name">goo</bar>
    </foo>
    

    start-from attr should set inline css in <code> tag, enabling lines to start from a specific line number

    *****
    -----
    

    highlight-lines attr causes corresponding lines to have 'highlighted' class

    1  highlighted
    2
    3  highlighted
    4
    5  highlighted
    6  highlighted
    7  highlighted
    8  highlighted
    9
    10
    

    highlight-lines attr with start-from attr should cause corresponding lines to have 'highlighted' class based on start-from

    11  highlighted
    12
    13  highlighted
    14
    15  highlighted
    16  highlighted
    17  highlighted
    18  highlighted
    19
    20
    

    highlight-lines attr with empty (any variant) line-slice syntax should highlight leading/trailing spaces

    <foo>
      <bar type="name">goo</bar>
      <baz type="name">goo</baz>
      <qux type="name">goo</qux>
      <quux type="name">goo</quux>
    </foo>
    

    highlight-lines attr with full character-variant line-slice syntax should highlight only at specified range

    <foo>
      <bar type="name">goo</bar>
      <baz type="name">goo</baz>
      <qux type="name">goo</qux>
      <quux type="name">goo</quux>
    </foo>
    

    highlight-lines attr with partial character-variant line-slice syntax should default highlight to start/end of line

    <foo>
      <bar type="name">goo</bar>
      <baz type="name">goo</baz>
      <qux type="name">goo</qux>
      <quux type="name">goo</quux>
    </foo>
    

    highlight-lines attr with line-part syntax should highlight only at specified substring

    <foo>
      <bar type="name">goo</bar>
      <baz type="name">goo</baz>
      <qux type="name">go,o</qux>
      <quux type="name">go'o</quux>
      <quuux type="name">go-o</quuux>
      <quuuux type="name"> 3 arrays:[1, 2, 3], [4, 5, 6], and [7, 8, 9]. </quuuux>
    </foo>
    

    highlight-lines attr with full word-variant line-slice syntax should highlight only at specified word ranges

    <foo>
      <bar type="name"> goo </bar>
      <baz type="name"> goo </baz>
      <qux type="name"> goo </qux>
      <quux type="name"> goo </quux>
    </foo>
    

    highlight-lines attr with partial word-variant line-slice syntax should default highlight to start/end of line

    <foo>
      <bar type="name"> goo </bar>
      <baz type="name"> goo </baz>
      <qux type="name"> goo </qux>
      <quux type="name"> goo </quux>
    </foo>
    

    highlight-lines all attr should behave as expected

    import java.util.List;
    
    // Inventory is a class that stores inventory items in a list. Big Inventory.
    // It's designed as a thin wrapper on the List interface.
    public class Inventory {
        private List<Item> items;
    
        public int getItemCount(){
            return items.size();
        }
    
        public bool isEmpty() {
            return items.isEmpty();
        }
    
        public Item getItem(idx: int) {
            return items.get(idx);
        }
    
        public void addItem(item: Item) {
            return items.add(item);
        }
    
        public void removeItem(item: Item) {
            return items.remove(item);
        }
    }
    

    Should render correctly with heading

    A heading
    <foo>
        <bar>
    </foo>
    

    Inline markdown contained in heading should also be rendered correctly

    Bold, Italic, Bold and Italic, Strike through, Super Bold, Underline, Highlight, Large, Small, 👍 ❗️ ❌ 🚧
    We support page breaks
    <foo>
        <bar>
    </foo>
    

    Code block with multiple linebreaks should not have the empty lines collapsed

    
    Four empty lines below, one above
    
    
    
    
    Four empty lines above, one below
    
    

    Code block without line numbers and multiple linebreaks should not have the empty lines collapsed

    
    Four empty lines below, one above
    
    
    
    
    Four empty lines above, one below
    
    

    Code block with syntax highlighting and multiple linebreaks should not have the empty lines collapsed

    
    function fourEmptyLinesBelowOneAbove() {
    
    
    
    
    } // four empty lines above, one below
    
    

    span with hljs class should span multiple lines (Link for context)

    *****
    -----
    

    Span containing multi-line strings should have each line wrapped in a hljs span

    var x = `<span class="string">This is a
    really long string
    that spans multiple lines
    super annoying"</span>`
    
    ## My header
    
    <p>Some paragraphs
    
    123                           5
    </p>
    
    <br>
    another paragraph<span>some span
    abc
    a
    
    b</span>
    
    ### Header 2
    

    Having in code blocks should not interfere with hljs

    const a = `another
    
    really
    
    reallly
    
    
    reallly                   really
    long string`
    
    const b = `long string
    with multiple
    
    embeded <span>
    
    </span>
    
    <span>`