﻿file = r'resources\views\test-sessions\fill.blade.php'
with open(file, 'r', encoding='utf-8') as f:
    c = f.read()

old = "@endif\n            <div class=\"mb-3\">\n            @endif\n            @if(!("
new = "@endif\n            @if(!("

if old in c:
    c = c.replace(old, new)
    print("OK!")
else:
    print("GAGAL - cek:")
    idx = c.find('@endif\n            <div class="mb-3">\n            @endif')
    print(repr(c[idx-30:idx+100]))

with open(file, 'w', encoding='utf-8') as f:
    f.write(c)
