Skip to content

Commit 0be741c

Browse files
committed
Fix LSINF1252 broken-like link
1 parent e68cc52 commit 0be741c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

results/results1.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2575,7 +2575,7 @@
25752575
},
25762576
{
25772577
"title": "Printing data",
2578-
"description": "In this exercise, you will familiarize yourself with the functions\r\n[printf(3)](https://sites.uclouvain.be/SystInfo/manpages/man3/printf.3.html)\r\n(printing on the standard output) and\r\n[sprintf(3)](https://inginious.info.ucl.ac.be/course/LSINF1252/%60printf%20%3Chttps://sites.uclouvain.be/SystInfo/manpages/man3/sprintf.3.html)\r\n(text formatting).\r\n",
2578+
"description": "In this exercise, you will familiarize yourself with the functions\r\n[printf(3)](https://sites.uclouvain.be/SystInfo/manpages/man3/printf.3.html)\r\n(printing on the standard output) and\r\n[sprintf(3)](https://sites.uclouvain.be/SystInfo/manpages/man3/sprintf.3.html)\r\n(text formatting).\r\n",
25792579
"tags": [
25802580
{
25812581
"text": "INGINIOUS",
@@ -4656,6 +4656,6 @@
46564656
"1": "Misconception",
46574657
"2": "autres"
46584658
},
4659-
"extraction_date": "2019-12-17T22:37:37.244Z",
4659+
"extraction_date": "2019-12-17T23:03:38.265Z",
46604660
"url": "https://github.com/UCL-INGI/LSINF1252"
46614661
}

strategies/inginious-git.js

+7
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,13 @@ function clean_inginious_links(description, inginious_link) {
546546

547547
// To solve nasty links found
548548
const url_solver = (givenUrl) => {
549+
550+
// conner case for links of LSINF1252 - some links are literally broken like
551+
// like "%60printf%20%3Chttps://sites.uclouvain.be/SystInfo/manpages/man3/sprintf.3.html"
552+
if (givenUrl.startsWith("%")) {
553+
givenUrl = givenUrl.replace(/\%.*http/, "http");
554+
}
555+
549556
// if already an absolute link, no work to do or
550557
// if no inginiousURL in settings, cannot infer the real link
551558
if (isAbsoluteUrl(givenUrl) || inginious_link.length === 0) {

0 commit comments

Comments
 (0)