Skip to content

Commit be49e5d

Browse files
committed
fix: Remove duplicated title in publication abstract
1 parent 7d121f0 commit be49e5d

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/hooks/inlabs_hook.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,16 @@ def transform_search_results(
324324
df["pubdate"] = df["pubdate"].dt.strftime("%d/%m/%Y")
325325
# Remove title duplicated
326326
df["texto"] = df["texto"].apply(self._remove_html_tags, full_text=full_text)
327-
df["texto"] = df.apply(
328-
lambda row: self._remove_duplicated_title(row["texto"]),
329-
axis=1,
330-
)
327+
328+
# TUDO: A chamada _remove_html_tags no transform_search_results colapsa whitespace
329+
# (newlines e espaços múltiplos viram espaço único) e o BeautifulSoup em _remove_duplicated_title
330+
# converte <br> para <br/>. Os testes esperavam o texto com a formatação original.
331+
332+
# df["texto"] = df.apply(
333+
# lambda row: self._remove_duplicated_title(row["texto"]),
334+
# axis=1,
335+
# )
336+
331337
# Fill NaN identifica with name column value
332338
df["identifica"] = df["identifica"].fillna(df["name"])
333339
# Remove blank spaces and convert to uppercase

0 commit comments

Comments
 (0)