Describe the bug:
The search function currently includes non-content elements (such as titles, dotted lines, and headers) in the search output. These elements are counted towards the specified number of lines. The function should ignore these elements and only include the actual content lines in the search results.
To Reproduce:
Steps to reproduce the behavior:
Run the application and navigate to https://localhost:3000/
Choose the ORCA log file as the input and upload it.
Provide the following search inputs:
Search term (e.g., "CARTESIAN COORDINATES (A.U.)")
Lines specified (e.g., FIRST 5)
Number of sections (e.g., 1, 2)
Click on Preview Output
Observe that the title, dotted line, and header are incorrectly included in the output
Expected behavior:
Using the search criteria above, the output should display only the first 5 lines of actual content for "CARTESIAN COORDINATES (A.U.)" from cycles 1 and 2. Empty lines, titles, dotted lines, and headers should be ignored in the search results.
Current behavior:
The search function incorrectly considers non-content elements (such as titles and formatting lines) as part of the output. This results in displaying fewer lines of relevant content, as these elements are counted towards the specified number of lines. For example, with the current implementation, only 2 lines of actual content are shown instead of the expected 5 lines.
Acceptance Criteria:
-Exclude titles, headers, dotted lines, and empty lines from results
-Count only actual content lines toward the user-specified limit
-Show correct number of content lines per section (e.g., 5 per section)
-If fewer content lines exist, show available lines and notify user
-Maintain support for multi-section and multi-term searches
-Preview output must match filtered, content-only results
Describe the bug:
The search function currently includes non-content elements (such as titles, dotted lines, and headers) in the search output. These elements are counted towards the specified number of lines. The function should ignore these elements and only include the actual content lines in the search results.
To Reproduce:
Steps to reproduce the behavior:
Run the application and navigate to https://localhost:3000/
Choose the ORCA log file as the input and upload it.
Provide the following search inputs:
Search term (e.g., "CARTESIAN COORDINATES (A.U.)")
Lines specified (e.g., FIRST 5)
Number of sections (e.g., 1, 2)
Click on Preview Output
Observe that the title, dotted line, and header are incorrectly included in the output
Expected behavior:
Using the search criteria above, the output should display only the first 5 lines of actual content for "CARTESIAN COORDINATES (A.U.)" from cycles 1 and 2. Empty lines, titles, dotted lines, and headers should be ignored in the search results.
Current behavior:
The search function incorrectly considers non-content elements (such as titles and formatting lines) as part of the output. This results in displaying fewer lines of relevant content, as these elements are counted towards the specified number of lines. For example, with the current implementation, only 2 lines of actual content are shown instead of the expected 5 lines.
Acceptance Criteria:
-Exclude titles, headers, dotted lines, and empty lines from results
-Count only actual content lines toward the user-specified limit
-Show correct number of content lines per section (e.g., 5 per section)
-If fewer content lines exist, show available lines and notify user
-Maintain support for multi-section and multi-term searches
-Preview output must match filtered, content-only results