Skip to content

Commit

Permalink
Fix the broken PageNumber and PageCount-variables
Browse files Browse the repository at this point in the history
  • Loading branch information
manuth committed Apr 3, 2017
1 parent 34cdff2 commit 28db203
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
- Added malformated FrontMatter-Recognition
- Improved the MarkDown-document-detection
- Added JavaScript-logic-variables
- Fixed the broken PageNumber and PageCount-variables

<!--- References -->
[MarkdownItCheckbox]: https://www.npmjs.com/package/markdown-it-checkbox
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "markdown-converter",
"displayName": "MarkdownConverter",
"description": "Provides the functionallity to convert MarkDown-files to html, pdf or png.",
"version": "0.0.5",
"version": "0.0.6",
"publisher": "manuth",
"author": {
"name": "Manuel Thalmann",
Expand Down
4 changes: 2 additions & 2 deletions src/Phantom/PDFGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ catch (e)
{
subject = subject.replace(/{{[\s]*(PageNumber|PageCount)[\s]*}}/g, function (match : string) : string
{
if (/PageNumber/g)
if (/PageNumber/g.test(match))
{
return pageNumber.toString();
}
else if (/PageCount/g)
else if (/PageCount/g.test(match))
{
return pageCount.toString();
}
Expand Down

0 comments on commit 28db203

Please sign in to comment.