Skip to content

Commit

Permalink
fix: clean newline characters in page paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanaturner committed Mar 2, 2024
1 parent 7f15aa4 commit 1a28b6d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions API/reuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ function parseURL(url) {
*/
function cleanPath(path) {
let front = "", back = path;
path = path.replace(/\r?\n/g, '');
if (path.includes('/'))
[, front, back] = path.match(/(^.*[^\/]\/)([^\/].*?$)/); //only modifying page, not whole path
try {
Expand Down
2 changes: 1 addition & 1 deletion public/Henry Agnew/Remixer/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -92745,7 +92745,7 @@ var Remixer = /*#__PURE__*/function (_React$Component) {
flex: 1
}
}, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
title: "Version ".concat(new Date("Tue Feb 13 2024 21:06:54 GMT-0800 (Pacific Standard Time)"), "\nMade with \u2764"),
title: "Version ".concat(new Date("Sat Mar 02 2024 11:21:57 GMT-0800 (Pacific Standard Time)"), "\nMade with \u2764"),
placement: "right"
}, /*#__PURE__*/_react["default"].createElement(_Info["default"], null))), this.state.permission !== 'Demonstration' ? /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
title: 'Loads an autosave from when you last closed the Remixer'
Expand Down
1 change: 1 addition & 0 deletions public/Miscellaneous/reuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ function LibreTextsReuse() {
*/
function cleanPath(path) {
let front = "", back = path;
path = path.replace(/\r?\n/g, '');
if (path.includes('/'))
[, front, back] = path.match(/(^.*[^\/]\/)([^\/].*?$)/); //only modifying page, not whole path
try {
Expand Down

0 comments on commit 1a28b6d

Please sign in to comment.