Skip to content

Ignore non-searched terms and characters in output. #173

Description

@Lyskawa-Aonyx

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions