Skip to content

Commit 64b90b2

Browse files
authored
Flowing bits (#394)
* Update index.js * Update check-learning-path-links.yml * Update EgressHelper.cs * Update check-learning-path-links.yml * Update index.js * Update index.js * Update EgressHelper.cs * Update check-learning-path-links.yml * Update EgressHelper.cs * Update index.js * Update check-learning-path-links.yml * Update action.yml * Update action.yml * Update check-learning-path-links.yml * Update action.yml * Update check-learning-path-links.yml * Update action.yml * Update check-learning-path-links.yml * Update action.yml * Update action.yml * Update index.js * Update check-learning-path-links.yml * Update check-learning-path-links.yml * Update check-learning-path-links.yml * Update check-learning-path-links.yml * Update action.yml * Update index.js * Update check-learning-path-links.yml * Update index.js * Update index.js * Update index.js * Update check-learning-path-links.yml * Update action.yml * Update check-learning-path-links.yml * Update action.yml * Update check-learning-path-links.yml * Update index.js * Update check-learning-path-links.yml * Update EgressHelper.cs * Update index.js * Update EgressHelper.cs * Update index.js * Update check-learning-path-links.yml * Update index.js * Update check-learning-path-links.yml * Update check-learning-path-links.yml * Update check-learning-path-links.yml * Update check-learning-path-links.yml * Update index.js * Update check-learning-path-links.yml * Update check-learning-path-links.yml * Update index.js * Update index.js * Update index.js * Update index.js * Update action-utils.js * Update ServiceCollectionExtensions.cs * Update ServiceCollectionExtensions.cs * Update EgressHelper.cs * Update action-utils.js * Update index.js * Update EgressHelper.cs * Update ServiceCollectionExtensions.cs * Update index.js * Update index.js * Update index.js * Update index.js * Update ServiceCollectionExtensions.cs * Update EgressHelper.cs
1 parent 6cb380a commit 64b90b2

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/actions/action-utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ module.exports.friendlyDateFromISODate = function(isoDate) {
5151

5252
module.exports.splitVersionTag = splitVersionTag;
5353
module.exports.readFile = (fileName) => util.promisify(fs.readFile)(fileName, 'utf8');
54+
module.exports.writeFile = (fileName, contents) => util.promisify(fs.writeFile)(fileName, contents);

.github/actions/learning-path-staleness-check/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function AppendLineNumber(text, lineNumber)
8686

8787
function CheckForEndOfLink(str, startIndex)
8888
{
89-
const illegalCharIndex = str.substr(startIndex).search("[(), '\`\"\}\{]|\. |\.\n"); // This regex isn't perfect, but should cover most cases.
89+
const illegalCharIndex = str.substr(startIndex).search(/[\>\])\s]|$|.$|.\s/m); // This regex isn't perfect, but should cover most cases.
9090
return illegalCharIndex;
9191
}
9292

@@ -131,7 +131,8 @@ function ValidateLinks(learningPathContents, repoURLToSearch, modifiedPRFiles, l
131131
for(let startOfLink of linkIndices)
132132
{
133133
// Clean up the link, determine if it has a line number suffix
134-
const endOfLink = startOfLink + CheckForEndOfLink(learningPathContents, startOfLink)
134+
let endOfLink = startOfLink + CheckForEndOfLink(learningPathContents, startOfLink)
135+
if (endOfLink === -1) { endOfLink = learningPathContents.length; } // If no illegal characters are found, the link is at the end of the file
135136

136137
const link = learningPathContents.substring(startOfLink, endOfLink);
137138

0 commit comments

Comments
 (0)