Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title Line Breaks Cause Issues in JSON File #50

Merged
merged 2 commits into from
May 27, 2024

Conversation

super-structure
Copy link
Contributor

This seems related to issue #47 , but it's showing up in a different place. Here, it seems that the line breaks are not being escaped in the resulting lunr.json file for the search functionality.

Suggested resolution

As the whitespace in a title (whether intentional or not) isn't really relevant to the search functionality, simply using the same replace function in xpath as is used elsewhere in the data-to-json.xsl file seems a simple and consistent fix for this issue.

Configuration

  • DITA OT v4.2.3
  • net.infotexture.dita-bootstrap.lunr plugin v5.3.4
  • Node.js v20.9.0

Update to remove any extra whitespace from the title ('t') value in the resulting JSON file for search data.
xsl/data-to-json.xsl Outdated Show resolved Hide resolved
Chanaged whitespace to use normalize-space() function for consistency
Copy link
Collaborator

@jason-fox jason-fox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jason-fox jason-fox merged commit 47123a1 into infotexture:develop May 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants