0

Today I discovered that the HTML markup language declarations for code blocks no longer work. They are still described in the advanced markup help, though.

Is this a bug in the documentation or the implementation?

Examples,

  1. Triple backticks. Using a language tag here does work (but not on Meta). Literal:

    ```bash
    #!/bin/bash
    [ -d '.' ] && echo "My directory is $PWD"
    ```
    

    And the corresponding rendered text:

    #!/bin/bash
    [ -d '.' ] && echo "My directory is $PWD"
    
  2. Older style HTML comment. Also doesn't work on Meta, used to work on U&L but does no longer. Literal:

    <!--language: lang-bash-->
        #!/bin/bash
        [ -d '.' ] && echo "My directory is $PWD"
    

    And the corresponding rendered text:

    #!/bin/bash
    [ -d '.' ] && echo "My directory is $PWD"
    

Here is a screenshot from U&L to illustrate the rendering behaviour

Text rendered as on Unix&Linux

1 Answer 1

4

You're just missing a couple of spaces. It should be:

<!-- language: lang-bash -->

    #!/bin/bash
    [ -d '.' ] && echo "My directory is $PWD"

Note that the documentation does have spaces after <!-- and before -->.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .