Skip to content

Commit

Permalink
Modify display of queried string for volpiano and mode searches
Browse files Browse the repository at this point in the history
  • Loading branch information
dchiller committed Aug 24, 2023
1 parent f88915b commit 99ee8af
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,18 @@ export default Marionette.Object.extend({
// Modify query returned by solr so it is ready for display.
// Remove escaping backslashes from the displayed string.
let query = this.searchParameters.get('query');
let displayedQuery = (fieldName === "volpiano" || fieldName === "volpiano_literal") ? query.replaceAll("\\-", "-") : query;
let displayedQuery;
switch (fieldName){
case "volpiano":
case "volpiano_literal":
displayedQuery = query.replaceAll("\\-", "-");
break;
case "mode":
displayedQuery = query.join(", ");
break;
default:
displayedQuery = query;
}
return {
fieldName: fieldName,
query: query,
Expand Down

0 comments on commit 99ee8af

Please sign in to comment.