-
Notifications
You must be signed in to change notification settings - Fork 2
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
panic: runtime error: index out of range [-1] #4
Comments
Hi @dima2306 ! Thanks for creating an issue. Not sure, but yes could be, because we have a problem with ExtractTextCC method, which is the "closing tag <-> closing tag" text extraction function. Please, send me your blade files (if you can), and I will find out how we can fix it 👍 |
Hi @MaestroError. I think it will be very informative if this package can show on which file(s) it got stuck. |
One file where I got the error is this: <section class="refereal_" style="margin-top: 0;">
<br>
<div id="titletext">
Poleć koledze -<br><br>i zbierajcie razem punkty!
</div>
<div id="timeline">
<div class="dot" id="one">
<span></span>
<date>pierwszy krok</date>
</div>
<div class="dot" id="two">
<span></span>
<date>Drugi krok</date>
</div>
<div class="dot" id="three">
<span></span>
<date>Trzeci krok</date>
</div>
<div class="dot" id="four">
<span></span>
<date>Czwarty krok</date>
</div>
<div class="inside"></div>
</div>
<div id="titletext2">
<center>...</center>
</div>
<article class='modal one'>
<date>Użyj przycisku zaproszenia poniżej</date>
<h2>Zaproś kolegę</h2>
<p>
<center><br>Wpisz <b>adres e-mail</b> lub <b>numer telefonu</b> zaproszonych współpracowników
nauczyciel będzie mógł połączyć się z systemem. W ten sposób nowy profil zostanie natychmiast dodany
społeczność nauczycieli KINGS, dzięki czemu nauczyciel nie będzie musiał czekać na administrację
of KINGS, aby ją przejrzeć i zatwierdzić..<br></center>
</p>
</article>
<article class='modal two'>
<date>W razie potrzeby wyjaśnij współpracownikowi, jak się zarejestrować</date>
<h2>Twój kolega się rejestruje</h2>
<p>
<center><br>Zaproszony nauczyciel z kodem polecającym może wejść na stronę KINGS (www.kingsolympiad.com)
i wypełnij formularz rejestracyjny nauczyciela w ciągu kilku minut. Kiedy rejestrujesz nowego nauczyciela,
musisz wprowadzić podany przez siebie kod polecenia, aby zarówno Ty, jak i Twój współpracownik mogli to zrobić
korzystać z KRÓLÓW.<br></center>
</p>
</article>
<article class='modal three'>
<date>Uczestników Olimpiady dodaje się poprzez profil nauczyciela</date>
<h2>Zarejestrowani uczestnicy</h2>
<p>
<center><br>Nauczyciel, który zarejestruje się za pomocą podanego kodu polecającego, będzie mógł się zarejestrować
studentów na swoim profilu. Zarejestrowani studenci od razu otrzymują możliwość bezpłatnego udziału
faza kwalifikacyjna. <br></center>
</p>
</article>
<article class='modal four'>
<date>Korzyści dla uczniów i nauczycieli!</date>
<h2>Dodatkowe punkty!</h2>
<p class="text-center"><br>Jeśli uczniowie zarejestrowani przez nowego nauczyciela napiszą co najmniej 10 testów do etapu kwalifikacyjnego Olimpiady, otrzymasz 40 punktów aktywności. Te dodatkowe punkty zostaną dodane do Twojego profilu na koniec okresu i będziesz mógł je wymienić na wybrane przez siebie nagrody!<br></p>
</article>
<div style="padding-top:0; margin-bottom: 0" class="container">
<div class="row">
<div class="col-12 d-flex flex-column align-items-center">
<div>@if($pageText) {!! $pageText->content !!} @endif</div>
</div>
<form id="sendViaEmailForm">
<input style="display: none" type="Email" placeholder="E-mail" name="email" class="form-control">
<button id="sendViaEmailBtn">Zaproś kolegę przez e-mail</button>
</form>
<form id="sendViaPhoneForm">
<input style="display: none" type="text" name="phone" placeholder="Telefon. nie." class="form-control">
<button id="sendViaPhoneBtn"> Zaproś kolegę przez telefon</button>
</form>
</div>
</div>
</section> There are some deprecated and unknown tags like Output: Config file used successfully ─╯
Confirm: You have uncommitted changes. Recommended to commit or stash them first. Continue anyway? y/n [yes]:
y
- You have uncommitted changes, you can use -force parameter in cli or set 'force' to true in config file to avoid confirmation)
panic: runtime error: index out of range [-1]
goroutine 1 [running]:
github.com/MaestroError/html-strings-affixer/parsehtml.(*Parsehtml).removeParseSuffix(0xc000287e68, {0x0, 0x0})
/home/maestroerror/Desktop/html-strings-affixer/parsehtml/parsehtml.go:361 +0x92
github.com/MaestroError/html-strings-affixer/parsehtml.(*Parsehtml).parseContent(0xc000287e68, {0x533912, 0x4})
/home/maestroerror/Desktop/html-strings-affixer/parsehtml/parsehtml.go:323 +0xd8
github.com/MaestroError/html-strings-affixer/parsehtml.(*Parsehtml).ExtractTextCO(0xc000287e68)
/home/maestroerror/Desktop/html-strings-affixer/parsehtml/parsehtml.go:162 +0x9b
github.com/MaestroError/html-strings-affixer/parsehtml.(*Parsehtml).ParseFile(0xc000287e68, {0xc00001e2d0?, _}, {{0xc000014340, 0x1b}, {0xc000112140, 0x1, 0x4}, {0xc000112180, 0x2, ...}, ...})
/home/maestroerror/Desktop/html-strings-affixer/parsehtml/parsehtml.go:52 +0xc5
github.com/MaestroError/html-strings-affixer/app.runReplaceCommand()
/home/maestroerror/Desktop/html-strings-affixer/app/app.go:180 +0x325
github.com/MaestroError/html-strings-affixer/app.Start()
/home/maestroerror/Desktop/html-strings-affixer/app/app.go:61 +0x96
main.main()
/home/maestroerror/Desktop/html-strings-affixer/main.go:19 +0x25 |
@dima2306 Thank you! Already added in to do for the next release 👍 |
Fixed ✔️ Closing the issue, feel free to open new one 👍 |
Hello, the project I wanted to try this tool on is a very old Laravel 5.2
After running
./vendor/bin/hsa check
I get the error:Can this error occur if some blade files can have corrupted HTML structure or HTML fragments? I mean some files are "partial" and imported.
The text was updated successfully, but these errors were encountered: