Skip to content

Commit

Permalink
docs: make sure post-include-content filter out the same things
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Aug 4, 2024
1 parent 46ab671 commit 0bbea62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/astro-docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function includeContentPlugin() {
{
name: 'pre-include-content',
enforce: 'pre',
transform(code, id) {
transform(_, id) {
if (!id.includes('?includeContent') || id.includes('astro-entry')) return;

const [filePath] = id.split('?');
Expand All @@ -25,7 +25,7 @@ function includeContentPlugin() {
name: 'post-include-content',
enforce: 'post',
transform(code, id) {
if (!id.includes('?includeContent')) return;
if (!id.includes('?includeContent') || id.includes('astro-entry')) return;
const [filePath] = id.split('?');
const fileContent = map.get(filePath);

Expand Down

0 comments on commit 0bbea62

Please sign in to comment.