﻿file = r'resources\views\panel-tests\divisi\create.blade.php'
with open(file, 'r', encoding='utf-8') as f:
    c = f.read()

# Tambah @endif sebelum </script>\n@endpush
old = '</script>\n@endpush'
new = '</script>\n@endpush'

# Cek posisi - tambah @endif sebelum @endpush
old2 = "\n@endpush"
new2 = "\n@endif\n@endpush"

# Hitung dulu posisi @endpush
idx = c.rfind('@endpush')
print("@endpush ada di posisi:", idx)
print(repr(c[idx-50:idx+20]))
