Soumik Bose commited on
Commit ·
ae4a807
1
Parent(s): d7edb12
go
Browse files
download_messages_service.py
CHANGED
|
@@ -569,7 +569,7 @@ class ChatLogGenerator:
|
|
| 569 |
# Check if it's already a markdown link [text](url)
|
| 570 |
if not line.strip().startswith('['):
|
| 571 |
# Convert to "Click to View" link
|
| 572 |
-
processed_lines.append(f'<a href="{stripped}" style="color: #0055a5; text-decoration: underline; font-weight: bold;">Click to View</a>')
|
| 573 |
else:
|
| 574 |
processed_lines.append(line)
|
| 575 |
else:
|
|
@@ -579,7 +579,7 @@ class ChatLogGenerator:
|
|
| 579 |
|
| 580 |
def replace_url(match):
|
| 581 |
url = match.group(1)
|
| 582 |
-
return f'<a href="{url}" style="color: #0055a5; text-decoration: underline; font-weight: bold;">Click to View</a>'
|
| 583 |
|
| 584 |
processed_line = re.sub(url_pattern, replace_url, line)
|
| 585 |
processed_lines.append(processed_line)
|
|
@@ -646,7 +646,7 @@ class ChatLogGenerator:
|
|
| 646 |
# Show clickable "Click to View" link
|
| 647 |
html += f'''
|
| 648 |
<div style="margin-top: 2px;">
|
| 649 |
-
<a href="{file_path}" style="color: #0055a5; text-decoration: underline; font-weight: bold; font-size: 9pt;">Click to View</a>
|
| 650 |
</div>
|
| 651 |
'''
|
| 652 |
else:
|
|
@@ -682,7 +682,7 @@ class ChatLogGenerator:
|
|
| 682 |
# Show clickable "Click to View" link
|
| 683 |
html += f'''
|
| 684 |
<div style="margin-top: 2px;">
|
| 685 |
-
<a href="{file_path}" style="color: #0055a5; text-decoration: underline; font-weight: bold; font-size: 9pt;">Click to View</a>
|
| 686 |
</div>
|
| 687 |
'''
|
| 688 |
else:
|
|
|
|
| 569 |
# Check if it's already a markdown link [text](url)
|
| 570 |
if not line.strip().startswith('['):
|
| 571 |
# Convert to "Click to View" link
|
| 572 |
+
processed_lines.append(f'<a href="{stripped}" target="_blank" style="color: #0055a5; text-decoration: underline; font-weight: bold;">Click to View</a>')
|
| 573 |
else:
|
| 574 |
processed_lines.append(line)
|
| 575 |
else:
|
|
|
|
| 579 |
|
| 580 |
def replace_url(match):
|
| 581 |
url = match.group(1)
|
| 582 |
+
return f'<a href="{url}" target="_blank" style="color: #0055a5; text-decoration: underline; font-weight: bold;">Click to View</a>'
|
| 583 |
|
| 584 |
processed_line = re.sub(url_pattern, replace_url, line)
|
| 585 |
processed_lines.append(processed_line)
|
|
|
|
| 646 |
# Show clickable "Click to View" link
|
| 647 |
html += f'''
|
| 648 |
<div style="margin-top: 2px;">
|
| 649 |
+
<a href="{file_path}" target="_blank" style="color: #0055a5; text-decoration: underline; font-weight: bold; font-size: 9pt;">Click to View</a>
|
| 650 |
</div>
|
| 651 |
'''
|
| 652 |
else:
|
|
|
|
| 682 |
# Show clickable "Click to View" link
|
| 683 |
html += f'''
|
| 684 |
<div style="margin-top: 2px;">
|
| 685 |
+
<a href="{file_path}" target="_blank" style="color: #0055a5; text-decoration: underline; font-weight: bold; font-size: 9pt;">Click to View</a>
|
| 686 |
</div>
|
| 687 |
'''
|
| 688 |
else:
|