In this answer I have to use the character #
as it is part of SASS. But that formats the code as a comment.
How do I escape that character?
In this answer I have to use the character #
as it is part of SASS. But that formats the code as a comment.
How do I escape that character?
This is a failure of the Stack Exchange syntax highlighting. Because you haven't specified, it seems to be falling back on the default highlighting, which tries to be pretty general to any programming language. Since SASS isn't on the list of supported languages, you may have to either go with
<-- language: lang-css -->
for basic CSS formatting, or
<-- language: lang-none -->
to just turn off the highlighting entirely.
lang-default
. See my answer here, skip to the end.
You can also suppress syntax highlighting for an entire code block
by making it a <pre>
block.
Just put <pre>
at the beginning, </pre>
at the end,
and don't indent four spaces.
So, if you type:
<!-- I had to put this here in order to reproduce the OP's problem. -->
<!-- language: lang-default -->
@for $ii from 1 through $range {
.h-#{$property}-#{$item}-#{$ii * 10} { #{$property}-#{$item}: #{$ii * 10}px; }
}
<pre>@for $ii from 1 through $range {
.h-#{$property}-#{$item}-#{$ii * 10} { #{$property}-#{$item}: #{$ii * 10}px; }
}</pre>
You will get:
@for $ii from 1 through $range {
.h-#{$property}-#{$item}-#{$ii * 10} { #{$property}-#{$item}: #{$ii * 10}px; }
}
@for $ii from 1 through $range { .h-#{$property}-#{$item}-#{$ii * 10} { #{$property}-#{$item}: #{$ii * 10}px; } }
Beware that limited HTML tags work within a <pre>
...</pre>
block,
so, if you have any <
characters in your code (which is common for things like C, Java, and shell scripts),
you must escape them as <
(Less Than).
Under some circumstances, it may be necessary to encode >
as >
and &
as &
.
So, if you type:
for (i=0; i<n; i++) printf("Hello world.\n")
<pre>for (i=0; i<n; i++) printf("Hello world.\n")</pre>
<pre>for (i=0; i<n; i++) printf("Hello world.\n")</pre>
You will get:
for (i=0; i<n; i++) printf("Hello world.\n")
for (i=0; i for (i=0; i<n; i++) printf("Hello world.\n")