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

Plugin crash on ST2 #26

Open
paprikka opened this issue Mar 1, 2013 · 8 comments
Open

Plugin crash on ST2 #26

paprikka opened this issue Mar 1, 2013 · 8 comments

Comments

@paprikka
Copy link

paprikka commented Mar 1, 2013

Plugin crashes every time I open the file or paste its content to Sublime Text 2 (OSX Mountain Lion).

I'm using JADE with AngularJS, btw.

index.jade

div(ng-controller="app.controllers.MediaIndexCtrl").subpage.media-index-page
  .hero-unit
    h1 Multimedia
    p.lead Zarządzaj logotypami oraz materiałami dotyczącymi leków.
  div(upload, btn-title="Prześlij nowy plik", accept-file-types="(\.|\/)(gif|jpe?g|png|xlsx)$", ng-model="uploadWidgetActive", upload-target="/media/upload", on-uploaded="reloadMedia()")
  div
    h2
      | Dodane pliki:
      span.input-append.pull-right
        input(type="search", ng-model="mediaQuery", placeholder="Szukaj")
        button.btn(ng-click="mediaQuery=''") ×
    div(ng-show="!files.length").alert.alert-info Nie dodano jeszcze żadnego pliku.
    ul.thumbnails.files-list
      li(ng-hide="filtered.length")
        div.alert.alert-info Brak wyników
      li.thumbnail.span2(ng-repeat="file in filtered = (files | filter:mediaQuery)")
        a.thumbnail(ng-click="preview(file)")
          img.file-icon(ng-src="{{src = (file.thumbnailUrl || '/img/folder.jpeg')}}")
        div.caption
          h5 {{file.name}}
          div
            a.btn.btn-small(ng-href="{{file.url}}", target="_blank")
              i.icon-download
              |  Pobierz
            |  
            a.btn-small.btn.btn-inverse(ng-click="tryRemove(file)")
              i.icon-trash

Any idea what might be the cause of crash?

@davidtheclark
Copy link

Same crashing here.

@alexhanh
Copy link

alexhanh commented Mar 4, 2013

+1

Using AngularJS and Jade. Here's what seems to crash ST2 when pasting:

        .holding(style="position: relative;")
          .sidetip(style="position: absolute; left: 310px; margin-top: 5px; width: 250px;")
            span.help-block.tip(ng-show="orderForm.firstName.$error.tip || orderForm.lastName.$error.tip && !(orderForm.firstName.$error.required || orderForm.lastName.$error.required)") Kirjoita etu- ja sukunimesi.
            span.help-block.error(ng-show="orderForm.firstName.$error.required || orderForm.lastName.$error.required && !(orderForm.firstName.$error.tip || orderForm.lastName.$error.tip)")
              i.icon-remove
              |  Etu- tai sukunimi puuttuu!
            span.help-block.ok(ng-show="orderForm.firstName.$valid && orderForm.lastName.$valid")
              i.icon-ok
              |  Nimi näyttää hyvältä.
          input.name(type="text", name="firstName", ng-model="orderData.firstName", placeholder="Etunimi", validatenames="validatenames")
          input.name(type="text", name="lastName", ng-model="orderData.lastName", placeholder="Sukunimi", validatenames="validatenames")

When I remove the special accent character (äö), the paste works. Could this be an encoding issue?

What is weird that I've been using Jade with Angular quite some time just fine, with accented characters. This just recently started to brake.

@paprikka
Copy link
Author

paprikka commented Mar 4, 2013

This sounds pretty probable to me, but removing polish characters didn't help in my case.

That's the smallest piece of code that made ST2 unresponsive for few seconds:


        .control-group
          label.control-label Rola
          .controls
            div(user-role-picker, ng-model="user.role")              

        .control-group
          label.control-label Obszary terapeutyczne
          .controls
            div(specialization-picker, ng-model="user.specializations")
        .control-group 
          .controls
            input(type="checkbox",  name="mustChangePassword", ng-model="user.mustChangePassword")
            label.help-inline Uzytkownik musi ustawic haslo przy nastepnym logowaniu.


@alexhanh
Copy link

alexhanh commented Mar 4, 2013

I've been able to get it down to

span.help-inline foo.

Causes a momentary hangup. Can someone confirm?

The dot at the end along with the dots in the classes seems to cause the problems. Without looking at the bundle code, could this be a regexp problem inside the bundle?

@paprikka
Copy link
Author

paprikka commented Mar 4, 2013

2013/3/4 Alexander Hanhikoski [email protected]

span.help-inline foo.

I can:) Same thing here.

@paprikka
Copy link
Author

paprikka commented Mar 4, 2013

Seems that trailing dot causes the hangup. Maybe because of the alternative multiline syntax?

@alexhanh
Copy link

alexhanh commented Mar 4, 2013

I found the breaking commit davidrios@8d92837

@davidrios
Copy link

sorry, my repo was linking to this one incorrectly on the README. this one does not have that bug, and it's already fixed on mine.

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

4 participants