Skip to content

Commit

Permalink
bugfix: slides with '?' in its filename are not working (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzturc committed Nov 3, 2022
1 parent 5b825e6 commit 17c4023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/revealServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ export class RevealServer {

this._app.get('/embed/*', async (req, res) => {
const file = req.originalUrl.replace('/embed', '');
const filePath = path.join(this._baseDirectory, decodeURI(file.split('?')[0]));
const filePath = path.join(this._baseDirectory, decodeURIComponent(file.split('?')[0]));
const markup = await this._revealRenderer.renderFile(filePath, req.query);
res.send(markup);
});

this._app.get(/(\w+\.md)/, async (req, res) => {
this.filePath = path.join(this._baseDirectory, decodeURI(req.url.split('?')[0]));
this.filePath = path.join(this._baseDirectory, decodeURIComponent(req.url.split('?')[0]));
const markup = await this._revealRenderer.renderFile(this.filePath, req.query);
res.send(markup);
});
Expand Down

0 comments on commit 17c4023

Please sign in to comment.