import json
import tempfile
import unittest
from pathlib import Path
from app import highlight, interface
from tacitus_nlp import Events, source_span
from tacitus_nlp.data import convert, few_nerd, maven, vitamin
class ContractTests(unittest.TestCase):
def test_unicode_offsets_and_escaped_preview(self):
text = "🗳️ Río"
start = text.index("Río")
span = source_span(text, start, start + 3, "Río")
self.assertIn("<b>