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

Unpredictable indentation in pre element #17

Open
dscorbett opened this issue Jul 26, 2022 · 0 comments
Open

Unpredictable indentation in pre element #17

dscorbett opened this issue Jul 26, 2022 · 0 comments

Comments

@dscorbett
Copy link

QTads 3.3.0 unpredictably indents lines with leading spaces in pre elements.

bug.zip contains a T3 image and its source code. The important part of the source code is:

    showIntro
    {
        "<pre>";
"    <font color=#19177C>aaaaaaaaaaa</font> a <font color=#BA2121>aaaaaa aaaaaaa</font><b><font color=#AA5D1F>a</font></b><b><font color=#008000>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</font></b><font color=#BA2121>'</font><br>";
"    <font color=#19177C>aaaa</font> a <font color=#BA2121>aaaa aaaaaa aa aaaaaaaaaa a aaaaaaaaaaaa aaa aaaa aaaaaaaa aaaaaaa</font><br>";
        "</pre>";
    }

In QTads, the second line is only indented one space. Compare FrobTADS and the Web UI, which display it properly with both lines indented by four spaces.
The Bug Demo

Changing the first line’s apostrophe from ' to the HTML entity &#39; fixes the indentation in QTads. Alternatively, changing the game’s name from “The Bug Demo” to “Bug Demo” also fixes the indentation. It is unclear why either change would have any effect on the indentation of the second line.
Bug Demo

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