diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 09c46e70..874118c6 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -24,8 +24,25 @@ function walkForReadmes(dir: string, results: string[]) { function extractTitle(filePath: string) { const content = fs.readFileSync(filePath, 'utf8'); - const match = content.match(/^#\s+(.+)$/m); - return match ? match[1].trim() : ''; + let inFence = false; + + for (const line of content.split(/\r?\n/)) { + if (/^(```|~~~)/.test(line)) { + inFence = !inFence; + continue; + } + + if (inFence) { + continue; + } + + const match = line.match(/^#\s+(.+)$/); + if (match) { + return match[1].trim(); + } + } + + return ''; } function toTitleCase(value: string) { diff --git a/internal/ffmpeg/README.md b/internal/ffmpeg/README.md index 903aab5d..46419975 100644 --- a/internal/ffmpeg/README.md +++ b/internal/ffmpeg/README.md @@ -1,3 +1,5 @@ +# ffmpeg + ## FFplay output [FFplay](https://stackoverflow.com/questions/27778678/what-are-mv-fd-aq-vq-sq-and-f-in-a-video-stream) `7.11 A-V: 0.003 fd= 1 aq= 21KB vq= 321KB sq= 0B f=0/0`: