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

Preserve <pre> line formatting #12

Closed
martin-martin opened this issue Sep 16, 2020 · 1 comment
Closed

Preserve <pre> line formatting #12

martin-martin opened this issue Sep 16, 2020 · 1 comment

Comments

@martin-martin
Copy link

Converting code blocks with formatting seems to strip line breaks and indentation. E.g. when attempting to convert this HTML:

<pre><code>import random


num = random.randint(1, 10)
guess = None

while guess != num:
    guess = input("guess a number between 1 and 10: ")
    guess = int(guess)
    
    if guess == num:
        print("congratulations! you won!")
        break
    else:
        print("nope, sorry. try again!")</code></pre>

It turns into the following Markdown:

    import random


    num = random.randint(1, 10) guess = None

    while guess != num: guess = input("guess a number between 1 and 10: ") guess = int(guess) if guess == num: print("congratulations! you won!") break else: print("nope, sorry. try again!")
@martin-martin
Copy link
Author

This is working! Sorry for the false alarm, I must have had something messed up in my HTML 😅

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

No branches or pull requests

1 participant