Skip to main content
added 36 characters in body
Source Link
dessert
  • 40.6k
  • 17
  • 36
 

My two cents to just those two points you raised:

  • users may mistakenly take in code comments as part of the provided solution

    The syntax highlighting prevents that very well, for example:

      #!/bin/bash
      a=~/dir # fill variable a
    

    Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code block was preceded by <!-- language: lang-bash -->, see e.g. this answer of mine with a real-life example of the following as well.

  • its not easy to point to a specific code section without repeating it in the text

    You can use the usual formatting inside code blocks if you use the html markup, e.g.

      <pre><code>#!/bin/<i>bash</i> # italics
      a=<b>~/dir</b> # bold</code></pre>
    

    gives:

    #!/bin/bash # italics
      a=~/dir # bold

My two cents to just those two points you raised:

  • users may mistakenly take in code comments as part of the provided solution

    The syntax highlighting prevents that very well, for example:

      #!/bin/bash
      a=~/dir # fill variable a
    

    Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code block was preceded by <!-- language: lang-bash -->, see e.g. this answer of mine with a real-life example of the following as well.

  • its not easy to point to a specific code section without repeating it in the text

    You can use the usual formatting inside code blocks if you use the html markup, e.g.

      <pre><code>#!/bin/<i>bash</i> # italics
      a=<b>~/dir</b> # bold</code></pre>
    

    gives:

    #!/bin/bash # italics
      a=~/dir # bold
 

My two cents to just those two points you raised:

  • users may mistakenly take in code comments as part of the provided solution

    The syntax highlighting prevents that very well, for example:

      #!/bin/bash
      a=~/dir # fill variable a
    

    Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code block was preceded by <!-- language: lang-bash -->, see e.g. this answer of mine with a real-life example of the following as well.

  • its not easy to point to a specific code section without repeating it in the text

    You can use the usual formatting inside code blocks if you use the html markup, e.g.

      <pre><code>#!/bin/<i>bash</i> # italics
      a=<b>~/dir</b> # bold</code></pre>
    

    gives:

    #!/bin/bash # italics
      a=~/dir # bold
added 122 characters in body
Source Link
dessert
  • 40.6k
  • 17
  • 36

My two cents to just those two points you raised:

  • users may mistakenly take in code comments as part of the provided solution

    The syntax highlighting prevents that very well, for example:

      #!/bin/bash
      a=~/dir # fill variable a
    

    Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code block was preceded by <!-- language: lang-bash -->, see e.g. this answer of mine with a real-life example of the following as well.

  • its not easy to point to a specific code section without repeating it in the text

    You can use the usual formatting inside code blocks if you use the html markup, e.g.

      <pre><code>#!/bin/<i>bash</i> # italics
      a=<b>~/dir</b> # bold</code></pre>
    

    gives:

    #!/bin/bash # italics
      a=~/dir # bold

My two cents to just those two points you raised:

  • users may mistakenly take in code comments as part of the provided solution

    The syntax highlighting prevents that very well, for example:

      #!/bin/bash
      a=~/dir # fill variable a
    

    Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code block was preceded by <!-- language: lang-bash -->.

  • its not easy to point to a specific code section without repeating it in the text

    You can use the usual formatting inside code blocks if you use the html markup, e.g.

      <pre><code>#!/bin/<i>bash</i> # italics
      a=<b>~/dir</b> # bold</code></pre>
    

    gives:

    #!/bin/bash # italics
      a=~/dir # bold

My two cents to just those two points you raised:

  • users may mistakenly take in code comments as part of the provided solution

    The syntax highlighting prevents that very well, for example:

      #!/bin/bash
      a=~/dir # fill variable a
    

    Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code block was preceded by <!-- language: lang-bash -->, see e.g. this answer of mine with a real-life example of the following as well.

  • its not easy to point to a specific code section without repeating it in the text

    You can use the usual formatting inside code blocks if you use the html markup, e.g.

      <pre><code>#!/bin/<i>bash</i> # italics
      a=<b>~/dir</b> # bold</code></pre>
    

    gives:

    #!/bin/bash # italics
      a=~/dir # bold
deleted 2 characters in body
Source Link
dessert
  • 40.6k
  • 17
  • 36

My two cents to just those two points you raised:

  • users may mistakenly take in code comments as part of the provided solution

    The syntax highlighting prevents that very well, for example:

      #!/bin/bash
      a=~/dir # fill variable a
    

    Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code block was preceded by <!-- language: lang-bash -->.

  • its not easy to point to a specific code section without repeating it in the text

    You can use the usual formatting inside code blocks if you use the html markup, e.g.

      <pre><code>#!/bin/<i>bash</i> # italics
      a=<b>~/dir</b> # fill variable a<bold</code></pre>
    

    gives:

    #!/bin/bash # italics
      a=~/dir # fill variable abold

My two cents to just those two points you raised:

  • users may mistakenly take in code comments as part of the provided solution

    The syntax highlighting prevents that very well, for example:

      #!/bin/bash
      a=~/dir # fill variable a
    

    Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code block was preceded by <!-- language: lang-bash -->.

  • its not easy to point to a specific code section without repeating it in the text

    You can use the usual formatting inside code blocks if you use the html markup, e.g.

      <pre><code>#!/bin/<i>bash</i>
      a=<b>~/dir</b> # fill variable a</code></pre>
    

    gives:

    #!/bin/bash
      a=~/dir # fill variable a

My two cents to just those two points you raised:

  • users may mistakenly take in code comments as part of the provided solution

    The syntax highlighting prevents that very well, for example:

      #!/bin/bash
      a=~/dir # fill variable a
    

    Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code block was preceded by <!-- language: lang-bash -->.

  • its not easy to point to a specific code section without repeating it in the text

    You can use the usual formatting inside code blocks if you use the html markup, e.g.

      <pre><code>#!/bin/<i>bash</i> # italics
      a=<b>~/dir</b> # bold</code></pre>
    

    gives:

    #!/bin/bash # italics
      a=~/dir # bold
Source Link
dessert
  • 40.6k
  • 17
  • 36
Loading