AndreasBackx / StyleSorter

CSS and SCSS attribute type sorter for Sublime Text 3. THIS PROJECT HAS BEEN ABANDONED.
8 stars 3 forks source link

IndexError: string index out of range #10

Open rickdoesburg opened 9 years ago

rickdoesburg commented 9 years ago

Whenever I call the StyleSorter using CMD + SHIFT + P it returns

Traceback (most recent call last): File "Parser in /Users/rickdoesburg/Library/Application Support/Sublime Text 3/Installed Packages/StyleSorter.sublime-package", line 25, in run File "Parser in /Users/rickdoesburg/Library/Application Support/Sublime Text 3/Installed Packages/StyleSorter.sublime-package", line 187, in format File "Parser in /Users/rickdoesburg/Library/Application Support/Sublime Text 3/Installed Packages/StyleSorter.sublime-package", line 253, in order File "Parser in /Users/rickdoesburg/Library/Application Support/Sublime Text 3/Installed Packages/StyleSorter.sublime-package", line 278, in order IndexError: string index out of range

AndreasBackx commented 9 years ago

Could you provide the file on which you tried to use StyleSorter?

rickdoesburg commented 9 years ago
//----- BREADCRUMBS -----\\
.breadcrumbs {
    overflow: hidden;
    padding: 0 0 1em;
    margin: 0 0 1.5em 0;
    border-bottom: 1px solid $dzw_dgrey;

    .breadcrumb-item {
        display: inline-block;

        list-style-type: none;
    }

    .breadcrumb-item-link {
        @include font-size (1.2);

        padding-right: .5em;

        color: $txtcolor;

        &:after {
            @include sprite-dimensions($icons, chevron-black-right-small);

            display: inline-block;

            margin-left: .5em;

            background-image: sprite-url($icons);
            background-position: sprite-position($icons, chevron-black-right-small);

            content: "";
        }
    }

    &:last-child a:after {
        content: "";
    }
}

File"/Applications/Sublime Text.app/Contents/MacOS/sublime.py",line 513,in getitemraise IndexError()

AndreasBackx commented 9 years ago

I added the code markdown to your comment, please do so yourself in the future. What does this do in that file even?

File "/Applications/Sublime Text.app/Contents/MacOS/sublime.py", line 513, in getitem raise IndexError() IndexError

rickdoesburg commented 9 years ago

Thanks, haven't used Markdown that much. I'm not sure what you're getting at?

Edit: forget about that error, that's something else completely unrelated.

This is the error: Traceback (most recent call last): File "Parser in /Users/rickdoesburg/Library/Application Support/Sublime Text 3/Installed Packages/StyleSorter.sublime-package", line 25, in run File "Parser in /Users/rickdoesburg/Library/Application Support/Sublime Text 3/Installed Packages/StyleSorter.sublime-package", line 187, in format File "Parser in /Users/rickdoesburg/Library/Application Support/Sublime Text 3/Installed Packages/StyleSorter.sublime-package", line 253, in order File "Parser in /Users/rickdoesburg/Library/Application Support/Sublime Text 3/Installed Packages/StyleSorter.sublime-package", line 278, in order IndexError: string index out of range

Edit2: Another test file

.product-filter-container {
    float: left;
    width: 100%;
    padding: 0; 
    margin-top: 60px;

    @media #{$desktop} { 
        width: 25%;
        padding-right: 15px;
    }

    .clear-all { 
        text-decoration: none;
        padding: 10px 5px;
        display: block;

        &:hover { text-decoration: underline; } 
    }

    .filter-heading {
        cursor: pointer;

        .icon-caret { 
            display: block;
            display: block;
            float: right;
            color: #fff;  
        }

        @media #{$desktop} { 
            cursor: default; 

            .icon-caret { display: none; }
        }
    } // .filter-heading

    .product-filters { 
        display: none;

        @media #{$desktop} { display: block; }
    }

    &.is-expanded {
        .product-filters { display: block;  }

        .icon-caret {
            @include transform(rotate(180deg)); 
            @include transition(all .2s ease-in-out);
        }
    } // .product-filter-container.is-expanded

    .filter.is-open .filter__title .icon-caret { 
        @include transform(rotate(180deg)); 
        @include transition(all .2s ease-in-out);
    }

    .filter__title {
        background: #e2e1e1;
        padding: 5px 10px;
        width: 100%;
        display: block;

        cursor: pointer;
    } // .filter__title

    .icon-caret { 
        float: right;

        color: #888888;
        @include font-size(1.6);

        @include transition(all .2s ease-in-out);

        &:before {
            content: '\f0d7';
            display: inline-block;
            font: normal normal normal 14px/1 FontAwesome;
            font-size: inherit;
            text-rendering: auto;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            transform: translate(0, 0);
        } 
    } // .icon-caret
} // .product-filter-container