Fix validator issue for itunes.subtitle
This commit is contained in:
parent
045e922f39
commit
07ec52e4dc
3
.editorconfig
Normal file
3
.editorconfig
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
25
index.ts
25
index.ts
|
@ -17,18 +17,17 @@ app.use(async (ctx) => {
|
||||||
"kontakt@midline.pl";
|
"kontakt@midline.pl";
|
||||||
parsed_data.rss.channel[0]["itunes:owner"][0]["itunes:name"] =
|
parsed_data.rss.channel[0]["itunes:owner"][0]["itunes:name"] =
|
||||||
"Arkadiusz Wieczorek, Kuba Orlik";
|
"Arkadiusz Wieczorek, Kuba Orlik";
|
||||||
parsed_data.rss.channel[0]["link"] = "https://www.internet-czas-dzialac.pl";
|
parsed_data.rss.channel[0]["link"] =
|
||||||
parsed_data.rss.channel[0][
|
"https://www.internet-czas-dzialac.pl";
|
||||||
"itunes:keywords"
|
parsed_data.rss.channel[0]["itunes:keywords"][0] =
|
||||||
][0] = parsed_data.rss.channel[0]["itunes:keywords"][0]
|
parsed_data.rss.channel[0]["itunes:keywords"][0]
|
||||||
.split(" ")
|
.split(" ")
|
||||||
.toString();
|
.toString();
|
||||||
parsed_data.rss.channel[0][
|
parsed_data.rss.channel[0]["itunes:summary"][0] =
|
||||||
"itunes:summary"
|
parsed_data.rss.channel[0]["itunes:summary"][0].replace(
|
||||||
][0] = parsed_data.rss.channel[0]["itunes:summary"][0].replace(
|
/(<([^>]+)>)/gi,
|
||||||
/(<([^>]+)>)/gi,
|
""
|
||||||
""
|
);
|
||||||
);
|
|
||||||
|
|
||||||
for (
|
for (
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
@ -49,7 +48,7 @@ app.use(async (ctx) => {
|
||||||
item["guid"][0].$.isPermaLink = item["guid"][0].$.isPermalink;
|
item["guid"][0].$.isPermaLink = item["guid"][0].$.isPermalink;
|
||||||
delete item["guid"][0].$.isPermalink;
|
delete item["guid"][0].$.isPermalink;
|
||||||
item["itunes:subtitle"][0] =
|
item["itunes:subtitle"][0] =
|
||||||
item["itunes:subtitle"][0].slice(0, -2) + "…";
|
item["itunes:subtitle"][0].split(".")[0] + ".";
|
||||||
item["itunes:summary"][0] = item["itunes:summary"][0].replace(
|
item["itunes:summary"][0] = item["itunes:summary"][0].replace(
|
||||||
/(<([^>]+)>)/gi,
|
/(<([^>]+)>)/gi,
|
||||||
""
|
""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user