Skip to content

Commit

Permalink
Merge pull request #3647 from kodebach/fix_news_link
Browse files Browse the repository at this point in the history
website: fix markdown link detection and render KEYNAMES.md
  • Loading branch information
mpranj committed Feb 3, 2021
2 parents 02dd062 + 47b7063 commit 77aec77
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ you up to date with the multi-language support provided by Elektra.
The website is generated from the repository, so all information about
plugins, bindings and tools are always up to date. Furthermore, we changed:

- <<TODO>>
- <<TODO>>
- It is now possible to have two links on the same line of a markdown file rendered on the website. _(Klemens Böswirth)_
- The file [doc/KEYNAMES.md](../KEYNAMES.md) is now rendered on the website. _(Klemens Böswirth)_
- <<TODO>>

## Outlook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ module.exports = function(grunt) {
};

this.ensureAbsoluteLinkPaths = function(filepath, text) {
return text.replace(/\[(.+)\]\(([^\)]+)\)/gi, function(
return text.replace(/\[([^\]]+)\]\(([^\)]+)\)/gi, function(
match,
text,
url
Expand All @@ -178,7 +178,7 @@ module.exports = function(grunt) {
};

this.ensureLinkToFile = function(text) {
return text.replace(/\[(.+)\]\(([^\)]+)\)/gi, function(
return text.replace(/\[([^\]]+)\]\(([^\)]+)\)/gi, function(
match,
text,
url
Expand Down Expand Up @@ -219,7 +219,7 @@ module.exports = function(grunt) {
};

this.copyImages = function(filepath, text) {
return text.replace(/!\[(.+)\]\(([^\)]+)\)/gi, function(
return text.replace(/!\[([^\]]+)\]\(([^\)]+)\)/gi, function(
match,
text,
url
Expand Down
13 changes: 13 additions & 0 deletions src/tools/website/resources/structure.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,19 @@
}
}]
},
{
"name": "Keynames",
"type": "staticlist",
"ref": "keynames",
"dev-comment": "",
"children": [{
"name": "keynames",
"type": "staticfile",
"options": {
"path": "doc/KEYNAMES.md"
}
}]
},
{
"name": "Compiling",
"type": "staticlist",
Expand Down

0 comments on commit 77aec77

Please sign in to comment.