lamhieu commited on
Commit
6f1d086
Β·
1 Parent(s): fbf0154

chore: update something

Browse files
Files changed (1) hide show
  1. docsifer/service.py +4 -1
docsifer/service.py CHANGED
@@ -66,8 +66,11 @@ class DocsiferService:
66
  try:
67
  content = html_file.read_text(encoding="utf-8", errors="ignore")
68
  d = pq(content)
69
- # Remove hidden elements
 
 
70
  d('*[style*="display:none"]').remove()
 
71
  cleaned_html = str(d)
72
  cleaned_html = cleaned_html.strip()
73
  html_file.write_text(cleaned_html, encoding="utf-8")
 
66
  try:
67
  content = html_file.read_text(encoding="utf-8", errors="ignore")
68
  d = pq(content)
69
+ # Remove hidden elements and styles
70
+ d(":hidden").remove()
71
+ d("[style='display:none']").remove()
72
  d('*[style*="display:none"]').remove()
73
+ d("style").remove()
74
  cleaned_html = str(d)
75
  cleaned_html = cleaned_html.strip()
76
  html_file.write_text(cleaned_html, encoding="utf-8")