Skip to content

Commit d92e0df

Browse files
committed
fix: end marker being removed
1 parent 95d78ad commit d92e0df

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async function updateReadme(videos, readmeFilePath) {
2323
const endMarker = '<!-- YOUTUBE:END -->';
2424

2525
const startIndex = content.indexOf(startMarker);
26-
const endIndex = content.indexOf(endMarker) + endMarker.length;
26+
const endIndex = content.indexOf(endMarker);
2727

2828
if (startIndex === -1 || endIndex === -1) {
2929
core.setFailed("Markers for YouTube videos not found in README.");
@@ -42,7 +42,6 @@ ${content.slice(endIndex)}`;
4242
const proxyUrl = 'https://latestvid.stats100.xyz';
4343
const channelId = core.getInput('youtube_channel_id');
4444
const readmeFilePath = core.getInput('readme_file_path');
45-
console.log(channelId, readmeFilePath)
4645

4746
const videos = await getLatestVideos(proxyUrl, channelId);
4847
await updateReadme(videos, readmeFilePath);

0 commit comments

Comments
 (0)