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

HTML folding for lowercase <dl> not working (except for lowest level elements) #3864

Open
mjross opened this issue Apr 24, 2020 · 3 comments
Milestone

Comments

@mjross
Copy link

mjross commented Apr 24, 2020

Summary

In HTML files, "DL" elements (e.g., <DL>) that have child "DL" elements nested within them, will only respond correctly to the folding/unfolding (collapse/expand) mouse click commands if the element name "DL" is uppercase, but not if it is lowercase, which violates the fundamental HTML syntax that the element names of open tags and self-closing tags should be case insensitive.

Steps to Reproduce

Help > Troubleshooting > Restart in Safe-Mode. Consider a simple test HTML file, such as the example provided here, which contains "DL" elements that have child "DL" elements nested within them:

<!DOCTYPE html>
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL>
    <DT><H3>dt 1</H3></DT>
    <DL>
        <DT><H3>dt 1.1</H3></DT>
        <DL>
            <DT><A HREF="http://www.example.com/">dt 1.1.1</A></DT>
        </DL>
        <DT><H3>dt 1.2</H3></DT>
        <DL>
            <DT><A HREF="http://www.example.com/">dt 1.2.1</A></DT>
        </DL>
    </DL>
    <DT><H3>dt 2</H3></DT>
    <DL>
        <DT><H3>dt 2.1</H3></DT>
        <DL>
            <DT><A HREF="http://www.example.com/">dt 2.1.1</A></DT>
        </DL>
        <DT><H3>dt 2.2</H3></DT>
        <DL>
            <DT><A HREF="http://www.example.com/">dt 2.2.1</A></DT>
        </DL>
    </DL>
</DL>

In this first case, the element names are all uppercase. We can use the mouse pointer to click on any one of the fold/unfold icons in order to fold into that line all of the indented lines below it. (I'm not sure what the proper name is for those small white boxes that contain a horizontal line bisecting each one.) For instance, if we click on the icon for line number 6, the lines of HTML indented under it are folded away correctly:

image

But if the element name is lowercase (i.e., <dl>), it does not work correctly and only folds the immediate next line but none of the remaining ones that should have been folded away:

image

This is true for all of the "dl" elements except for the one at the very lowest level -- on line 8 in this example.

Note that one of the most common examples of such files are browser bookmarks. In fact, that's how I stumbled upon this problem, when converting my bookmarks.html file from using uppercase element names to lowercase, at which point the code folding stop working properly.

Platform Information

Komodo IDE 11.1.1 build 91089 (on Windows Home 10.0.18363.778)

@th3coop th3coop added this to the Backlog milestone Apr 27, 2020
@th3coop
Copy link
Member

th3coop commented Apr 27, 2020

Thanks for filing, @mjross.

@mjross
Copy link
Author

mjross commented Apr 27, 2020

No problem, @th3coop, and I hope everyone in your family and the Komodo community are doing well during this pandemic.

@th3coop
Copy link
Member

th3coop commented Apr 27, 2020

Same to you @mjross. Stay safe and healthy, please and thank you!

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

2 participants