Docus特殊语法
yyytest
{
"key": "value"
}
function test() {
console.log('test')
}
public class Test {
public static void main(String[] args) {
System.out.println("test");
}
}
def test():
print('test')
package main
import "fmt"
func main() {
fmt.Println("test")
}
#include <stdio.h>
int main() {
printf("test\n");
return 0;
}
#include <iostream>
int main() {
std::cout << "test" << std::endl;
return 0;
}
<?php
function test() {
echo 'test';
}
?>
func test() {
print("test")
}
fun test() {
println("test")
}
fn test() {
println!("test");
}
function test(): void {
console.log('test');
}
# Get the current directory
$currentDir = Get-Location
# Define folders to exclude (add your folder names here)
$excludeFolders = @(".git", "node_modules", "Docusaurus-Vercel")
# Get all .md files in the current directory and its subdirectories, excluding specified folders
$mdFiles = Get-ChildItem -Path $currentDir -Recurse -Filter *.md |
Where-Object {
$fullPath = $_.FullName
-not ($excludeFolders | Where-Object { $fullPath -like "*\$_\*" })
}
# Display the found files
if ($mdFiles.Count -gt 0) {
Write-Host "Found the following .md files:"
foreach ($file in $mdFiles) {
Write-Host "File Name: $($file.Name)"
autocorrect.exe --fix $file.Name
Write-Host "------------------------"
}
Write-Host "Total .md files found: $($mdFiles.Count)"
} else {
Write-Host "No .md files found in the current directory and its subdirectories (excluding specified folders)."
}
# Optionally, you can export the results to a file
# $mdFiles | Select-Object Name, FullName | Export-Csv -Path "mdFiles.csv" -NoTypeInformation