Update highlighter.py
Browse files- highlighter.py +2 -2
highlighter.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import re
|
2 |
|
3 |
-
def highlight_common_words(common_words, sentences):
|
4 |
color_map = {}
|
5 |
color_index = 0
|
6 |
highlighted_html = []
|
@@ -33,7 +33,7 @@ def highlight_common_words(common_words, sentences):
|
|
33 |
final_html = "<br><br>".join(highlighted_html)
|
34 |
return f'''
|
35 |
<div style="border: solid 1px #; padding: 16px; background-color: #FFFFFF; color: #374151; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border-radius: 2px;">
|
36 |
-
<h3 style="margin-top: 0; font-size: 1em; color: #111827;">
|
37 |
<div style="background-color: #F5F5F5; line-height: 1.6; padding: 15px; border-radius: 2px;">{final_html}</div>
|
38 |
</div>
|
39 |
'''
|
|
|
1 |
import re
|
2 |
|
3 |
+
def highlight_common_words(common_words, sentences, title):
|
4 |
color_map = {}
|
5 |
color_index = 0
|
6 |
highlighted_html = []
|
|
|
33 |
final_html = "<br><br>".join(highlighted_html)
|
34 |
return f'''
|
35 |
<div style="border: solid 1px #; padding: 16px; background-color: #FFFFFF; color: #374151; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border-radius: 2px;">
|
36 |
+
<h3 style="margin-top: 0; font-size: 1em; color: #111827;">{title}</h3>
|
37 |
<div style="background-color: #F5F5F5; line-height: 1.6; padding: 15px; border-radius: 2px;">{final_html}</div>
|
38 |
</div>
|
39 |
'''
|