Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code block not detected correctly when indented #347

Open
JackMorganNZ opened this issue Dec 20, 2018 · 0 comments
Open

Code block not detected correctly when indented #347

JackMorganNZ opened this issue Dec 20, 2018 · 0 comments
Labels

Comments

@JackMorganNZ
Copy link
Member

The following code:

So how does UTF-8 actually work? Use the following process to do what the interactive is doing and convert characters to UTF-8 yourself.

1.  Lookup the Unicode number of your character.

2.  Convert the Unicode number to a binary number, using as **few** bits as necessary.
    Look back to the section on binary numbers if you cannot remember how to convert a number to binary.

3.  Count how many bits are in the binary number, and choose the correct pattern to use, based on how many bits there were.
    Step 4 will explain how to use the pattern.

    ```
    7  or fewer bits: 0xxxxxxx
    11 or fewer bits: 110xxxxx 10xxxxxx
    16 or fewer bits: 1110xxxx 10xxxxxx 10xxxxxx
    21 or fewer bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
    ```

4.  Replace the x's in the pattern with the bits of the binary number you converted in 2.
    If there are more x's than bits, replace extra left-most x's with 0's.

Should result in:

<ol>
<li>
<p>Lookup the Unicode number of your character.</p>
</li>
<li>
<p>Convert the Unicode number to a binary number, using as <strong>few</strong> bits as necessary.
Look back to the section on binary numbers if you cannot remember how to convert a number to binary.</p>
</li>
<li>
<p>Count how many bits are in the binary number, and choose the correct pattern to use, based on how many bits there were.
Step 4 will explain how to use the pattern.</p>
<pre><code>7  or fewer bits: 0xxxxxxx
11 or fewer bits: 110xxxxx 10xxxxxx
16 or fewer bits: 1110xxxx 10xxxxxx 10xxxxxx
21 or fewer bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx</code></pre>
</li>
<li>
<p>Replace the x's in the pattern with the bits of the binary number you converted in 2.
If there are more x's than bits, replace extra left-most x's with 0's.</p>
</li>
</ol>

however instead it renders as:

<ol>
<li>
<p>Lookup the Unicode number of your character.</p>
</li>
<li>
<p>Convert the Unicode number to a binary number, using as <strong>few</strong> bits as necessary.
Look back to the section on binary numbers if you cannot remember how to convert a number to binary.</p>
</li>
<li>
<p>Count how many bits are in the binary number, and choose the correct pattern to use, based on how many bits there were.
Step 4 will explain how to use the pattern.</p>
<p><code>7  or fewer bits: 0xxxxxxx
11 or fewer bits: 110xxxxx 10xxxxxx
16 or fewer bits: 1110xxxx 10xxxxxx 10xxxxxx
21 or fewer bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx</code></p>
</li>
<li>
<p>Replace the x's in the pattern with the bits of the binary number you converted in 2.
If there are more x's than bits, replace extra left-most x's with 0's.</p>
</li>
</ol>

Notice the pre block is shown as a p block. This occurs when indented for a list, but may also happen in other circumstances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant