Skip to content

Commit 49390dd

Browse files
author
Janaka-Steph
committed
Fix links to code
1 parent b68b5ab commit 49390dd

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

ui/src/helpers/log.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict'
2+
3+
module.exports = (str) => console.log(str.toString())

ui/src/helpers/replace.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
'use strict'
22

3-
module.exports = (str, from, to) => str.replace(from, to)
3+
module.exports = (str, from, to) => {
4+
let newStr
5+
if (typeof str !== 'string') {
6+
newStr = str
7+
.toString()
8+
.replace(from, to)
9+
} else {
10+
newStr = str.replace(from, to)
11+
}
12+
return newStr
13+
}

ui/src/partials/article.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{#if page.title}}
1313
<h1 class="page">{{{page.title}}}</h1>
1414
{{/if}}
15-
{{{page.contents}}}
15+
{{{replace page.contents '{page-origin-branch}' page.origin.branch}}}
1616
{{/if}}
1717

1818
{{#if (or page.previous page.next)}}

0 commit comments

Comments
 (0)