[{"data":1,"prerenderedAt":610},["ShallowReactive",2],{"navigation_docs":3,"-project-benchmarks-cross-format":239,"-project-benchmarks-cross-format-surround":605},[4,29,94,114,184],{"title":5,"icon":6,"path":7,"stem":8,"children":9},"Start",false,"\u002Fstart","1.start",[10,14,19,24],{"title":11,"path":7,"stem":12,"icon":13},"What jscpd finds","1.start\u002Findex","i-lucide-house",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fstart\u002Finstallation","1.start\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quickstart","\u002Fstart\u002Fquickstart","1.start\u002F3.quickstart","i-lucide-rocket",{"title":25,"path":26,"stem":27,"icon":28},"Configuration basics","\u002Fstart\u002Fconfiguration","1.start\u002F4.configuration","i-lucide-settings-2",{"title":30,"icon":6,"path":31,"stem":32,"children":33,"page":6},"Guides","\u002Fguides","2.guides",[34,39,44,49,54,59,64,69,74,79,84,89],{"title":35,"path":36,"stem":37,"icon":38},"Use jscpd in CI","\u002Fguides\u002Fci","2.guides\u002F01.ci","i-lucide-github",{"title":40,"path":41,"stem":42,"icon":43},"Pre-commit hooks","\u002Fguides\u002Fpre-commit","2.guides\u002F02.pre-commit","i-lucide-git-commit",{"title":45,"path":46,"stem":47,"icon":48},"Fail only on new duplication","\u002Fguides\u002Fbaseline","2.guides\u002F03.baseline","i-lucide-git-compare",{"title":50,"path":51,"stem":52,"icon":53},"Monorepos","\u002Fguides\u002Fmonorepos","2.guides\u002F04.monorepos","i-lucide-folder-tree",{"title":55,"path":56,"stem":57,"icon":58},"Cross-format detection","\u002Fguides\u002Fcross-format","2.guides\u002F05.cross-format","i-lucide-layers",{"title":60,"path":61,"stem":62,"icon":63},"Agents","\u002Fguides\u002Fagents","2.guides\u002F06.agents","i-lucide-cpu",{"title":65,"path":66,"stem":67,"icon":68},"Editors","\u002Fguides\u002Feditors","2.guides\u002F07.editors","i-lucide-code",{"title":70,"path":71,"stem":72,"icon":73},"Duplication over git history","\u002Fguides\u002Fhistory","2.guides\u002F08.history","i-lucide-chart-no-axes-combined",{"title":75,"path":76,"stem":77,"icon":78},"Dashboard and health score","\u002Fguides\u002Fdashboard","2.guides\u002F09.dashboard","i-lucide-layout-dashboard",{"title":80,"path":81,"stem":82,"icon":83},"Dead code","\u002Fguides\u002Fdead-code","2.guides\u002F10.dead-code","i-lucide-ghost",{"title":85,"path":86,"stem":87,"icon":88},"Comparing two codebases","\u002Fguides\u002Fcompare","2.guides\u002F11.compare","i-lucide-git-compare-arrows",{"title":90,"path":91,"stem":92,"icon":93},"Semantic clones","\u002Fguides\u002Fsemantic-clones","2.guides\u002F12.semantic-clones","i-lucide-brain-circuit",{"title":95,"icon":6,"path":96,"stem":97,"children":98,"page":6},"Concepts","\u002Fconcepts","3.concepts",[99,104,109],{"title":100,"path":101,"stem":102,"icon":103},"Types of code clones","\u002Fconcepts\u002Fclone-types","3.concepts\u002F1.clone-types","i-lucide-copy",{"title":105,"path":106,"stem":107,"icon":108},"How detection works","\u002Fconcepts\u002Fhow-detection-works","3.concepts\u002F2.how-detection-works","i-lucide-scan-search",{"title":110,"path":111,"stem":112,"icon":113},"The health score","\u002Fconcepts\u002Fhealth-score","3.concepts\u002F3.health-score","i-lucide-heart-pulse",{"title":115,"icon":6,"path":116,"stem":117,"children":118,"page":6},"Reference","\u002Freference","4.reference",[119,124,129,134,171,176,180],{"title":120,"path":121,"stem":122,"icon":123},"CLI options","\u002Freference\u002Fcli","4.reference\u002F1.cli","i-lucide-terminal",{"title":125,"path":126,"stem":127,"icon":128},"The config file","\u002Freference\u002Fconfig-file","4.reference\u002F2.config-file","i-lucide-settings",{"title":130,"path":131,"stem":132,"icon":133},"Exit codes","\u002Freference\u002Fexit-codes","4.reference\u002F3.exit-codes","i-lucide-log-out",{"title":135,"icon":6,"path":136,"stem":137,"children":138},"Reporters","\u002Freference\u002Freporters","4.reference\u002F4.reporters\u002Findex",[139,141,146,151,156,161,166],{"title":135,"path":136,"stem":137,"icon":140},"i-lucide-file-chart-column",{"title":142,"path":143,"stem":144,"icon":145},"HTML reporter","\u002Freference\u002Freporters\u002Fhtml","4.reference\u002F4.reporters\u002F2.html","i-lucide-file-code",{"title":147,"path":148,"stem":149,"icon":150},"JSON reporter","\u002Freference\u002Freporters\u002Fjson","4.reference\u002F4.reporters\u002F3.json","i-lucide-braces",{"title":152,"path":153,"stem":154,"icon":155},"Badge reporter","\u002Freference\u002Freporters\u002Fbadge","4.reference\u002F4.reporters\u002F4.badge","i-lucide-award",{"title":157,"path":158,"stem":159,"icon":160},"SARIF reporter","\u002Freference\u002Freporters\u002Fsarif","4.reference\u002F4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":162,"path":163,"stem":164,"icon":165},"CodeClimate reporter","\u002Freference\u002Freporters\u002Fcodeclimate","4.reference\u002F4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":167,"path":168,"stem":169,"icon":170},"OpenMetrics reporter","\u002Freference\u002Freporters\u002Fopenmetrics","4.reference\u002F4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":172,"path":173,"stem":174,"icon":175},"Supported formats","\u002Freference\u002Fsupported-formats","4.reference\u002F5.supported-formats","i-lucide-languages",{"title":177,"path":178,"stem":179,"icon":38},"GitHub Action","\u002Freference\u002Fgithub-action","4.reference\u002F6.github-action",{"title":181,"path":182,"stem":183,"icon":68},"Rust crates","\u002Freference\u002Frust-crates","4.reference\u002F7.rust-crates",{"title":185,"icon":6,"path":186,"stem":187,"children":188,"page":6},"Project","\u002Fproject","5.project",[189,194,199,204,229,234],{"title":190,"path":191,"stem":192,"icon":193},"Changelog","\u002Fproject\u002Fchangelog","5.project\u002F1.changelog","i-lucide-scroll-text",{"title":195,"path":196,"stem":197,"icon":198},"Migrating from v4 to v5","\u002Fproject\u002Fmigration","5.project\u002F2.migration","i-lucide-arrow-right-left",{"title":200,"path":201,"stem":202,"icon":203},"jscpd v4 (TypeScript)","\u002Fproject\u002Fv4","5.project\u002F3.v4","i-simple-icons-typescript",{"title":205,"icon":6,"path":206,"stem":207,"children":208},"Benchmarks","\u002Fproject\u002Fbenchmarks","5.project\u002F4.benchmarks\u002Findex",[209,211,216,220,225],{"title":205,"path":206,"stem":207,"icon":210},"i-lucide-gauge",{"title":212,"path":213,"stem":214,"icon":215},"Detection Speed","\u002Fproject\u002Fbenchmarks\u002Fdetection-speed","5.project\u002F4.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":217,"path":218,"stem":219,"icon":58},"Multi-Format Detection","\u002Fproject\u002Fbenchmarks\u002Fcross-format","5.project\u002F4.benchmarks\u002F3.cross-format",{"title":221,"path":222,"stem":223,"icon":224},"AI Token Efficiency","\u002Fproject\u002Fbenchmarks\u002Fai-token-efficiency","5.project\u002F4.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":226,"path":227,"stem":228,"icon":93},"Embedding Models","\u002Fproject\u002Fbenchmarks\u002Fembedding-models","5.project\u002F4.benchmarks\u002F5.embedding-models",{"title":230,"path":231,"stem":232,"icon":233},"Research","\u002Fproject\u002Fresearch","5.project\u002F5.research","i-lucide-graduation-cap",{"title":235,"path":236,"stem":237,"icon":238},"Articles","\u002Fproject\u002Farticles","5.project\u002F6.articles","i-lucide-newspaper",{"id":240,"title":217,"body":241,"description":596,"extension":597,"links":598,"meta":599,"navigation":600,"path":218,"seo":601,"stem":219,"__hash__":604},"docs\u002F5.project\u002F4.benchmarks\u002F3.cross-format.md",{"type":242,"value":243,"toc":587},"minimark",[244,273,278],[245,246,247,248,252,253,252,256,259,260,263,264,268,269,272],"p",{},"Component file formats (",[249,250,251],"code",{},".vue",", ",[249,254,255],{},".svelte",[249,257,258],{},".astro",") and rich documents (",[249,261,262],{},".md",") embed multiple languages in a single file — template, script, and style blocks in components; YAML frontmatter and fenced code blocks in markdown. A CPD tool's ability to parse these structures determines whether it can detect duplicates ",[265,266,267],"strong",{},"within"," each embedded language and ",[265,270,271],{},"across"," different file formats sharing the same code.",[274,275,277],"h2",{"id":276},"format-support-overview","Format Support Overview",[279,280,281,285,288,395,399,409,496,500,536,540,576],"benchmark-cross-format",{},[274,282,284],{"id":283},"cross-format-detection-svelte-astro","Cross-Format Detection (Svelte ↔ Astro)",[245,286,287],{},"The Svelte and Astro fixture components share ~60 lines of identical CSS and matching template structure. Only section-aware tools can attribute these matches to specific languages (CSS vs. markup vs. script).",[289,290,291,310],"table",{},[292,293,294],"thead",{},[295,296,297,301,304,307],"tr",{},[298,299,300],"th",{},"Tool",[298,302,303],{},"Cross-Format Clones",[298,305,306],{},"Lines",[298,308,309],{},"Detail",[311,312,313,328,342,356,370,383],"tbody",{},[295,314,315,319,322,325],{},[316,317,318],"td",{},"jscpd-rs",[316,320,321],{},"4",[316,323,324],{},"235",[316,326,327],{},"CSS (46 lines) + markup (7, 46, 136 lines)",[295,329,330,333,336,339],{},[316,331,332],{},"jscpd@5",[316,334,335],{},"2",[316,337,338],{},"53",[316,340,341],{},"CSS (46 lines) + markup (7 lines)",[295,343,344,347,350,353],{},[316,345,346],{},"Duplo",[316,348,349],{},"8",[316,351,352],{},"92",[316,354,355],{},"Raw text matches, no language attribution",[295,357,358,361,364,367],{},[316,359,360],{},"Simian",[316,362,363],{},"1+",[316,365,366],{},"—",[316,368,369],{},"Aggregate text blocks, no language attribution",[295,371,372,375,378,380],{},[316,373,374],{},"PMD CPD",[316,376,377],{},"0",[316,379,377],{},[316,381,382],{},"Cannot detect cross-format duplicates",[295,384,385,388,390,392],{},[316,386,387],{},"Fallow",[316,389,377],{},[316,391,377],{},[316,393,394],{},"JS\u002FTS only",[274,396,398],{"id":397},"markdown-embedded-code-detection","Markdown Embedded-Code Detection",[245,400,401,404,405,408],{},[249,402,403],{},"file3.md"," and ",[249,406,407],{},"file4.md"," contain identical TypeScript and Python code blocks inside fenced code regions, plus matching YAML frontmatter. Section-aware tools detect these as separate language clones; flat-text tools match only the surrounding prose.",[289,410,411,425],{},[292,412,413],{},[295,414,415,417,420,423],{},[298,416,300],{},[298,418,419],{},"Detected Embedded Languages",[298,421,422],{},"Clones",[298,424,306],{},[311,426,427,440,452,465,476,486],{},[295,428,429,431,434,437],{},[316,430,332],{},[316,432,433],{},"TypeScript, Python, YAML, Markdown",[316,435,436],{},"7",[316,438,439],{},"356",[295,441,442,444,447,449],{},[316,443,318],{},[316,445,446],{},"TypeScript, Python, YAML, Markdown, Coffeescript",[316,448,349],{},[316,450,451],{},"350",[295,453,454,456,459,462],{},[316,455,346],{},[316,457,458],{},"(flat text only)",[316,460,461],{},"5",[316,463,464],{},"195",[295,466,467,469,471,473],{},[316,468,360],{},[316,470,458],{},[316,472,321],{},[316,474,475],{},"219",[295,477,478,480,482,484],{},[316,479,374],{},[316,481,366],{},[316,483,377],{},[316,485,377],{},[295,487,488,490,492,494],{},[316,489,387],{},[316,491,366],{},[316,493,377],{},[316,495,377],{},[274,497,499],{"id":498},"key-findings","Key Findings",[501,502,503,520,526,531],"ul",{},[504,505,506,509,510,252,512,252,514,516,517,519],"li",{},[265,507,508],{},"All jscpd variants"," parse ",[249,511,251],{},[249,513,255],{},[249,515,258],{},", and ",[249,518,262],{}," into separate language sections, detecting cross-format clones with language attribution. jscpd@5 is the most conservative, finding 2 cross-format clones (53 lines); jscpd-rs finds 4 (235 lines).",[504,521,522,525],{},[265,523,524],{},"Simian and Duplo"," find text overlaps between file types but report them as undifferentiated matches — there is no way to tell whether the duplication is in CSS, JavaScript, or template markup.",[504,527,528,530],{},[265,529,374],{}," cannot detect cross-format duplicates at all. It processes each language independently and has no concept of component file structure.",[504,532,533,535],{},[265,534,387],{}," only analyzes JS\u002FTS, so it misses all CSS, template, and Markdown duplicates across formats.",[274,537,539],{"id":538},"methodology","Methodology",[501,541,542,552,558,564,570],{},[504,543,544,547,548,551],{},[265,545,546],{},"Target:"," ",[249,549,550],{},"fixtures\u002F"," directory — 547 files, 21,645 lines across 150+ language formats",[504,553,554,557],{},[265,555,556],{},"Within-format clones:"," Duplicates detected within the same file type (e.g., Svelte→Svelte)",[504,559,560,563],{},[265,561,562],{},"Cross-format clones:"," Duplicates detected across different file types (e.g., Svelte↔Astro)",[504,565,566,569],{},[265,567,568],{},"Embedded-code detection:"," Duplicates found inside embedded language blocks within multi-language files",[504,571,572,575],{},[265,573,574],{},"Hardware:"," Apple Silicon (Darwin arm64)",[245,577,578,579,586],{},"Full methodology details are in the ",[580,581,585],"a",{"href":582,"rel":583},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Fblob\u002Fmaster\u002Fbenchmark\u002FBENCHMARK.md",[584],"nofollow","jscpd repository",".",{"title":588,"searchDepth":589,"depth":589,"links":590},"",2,[591,592,593,594,595],{"id":276,"depth":589,"text":277},{"id":283,"depth":589,"text":284},{"id":397,"depth":589,"text":398},{"id":498,"depth":589,"text":499},{"id":538,"depth":589,"text":539},"How jscpd detects duplicates across Svelte, Astro, Vue, and Markdown formats — vs other tools.","md",null,{},{"icon":58},{"title":602,"description":603},"Multi-Format Detection Benchmarks — jscpd","jscpd is the only CPD tool that detects duplicates by embedded language across Svelte, Astro, Vue, and Markdown files.","B5Qa6ikKC82oNvxcDD6nLmMG84Jx34qZEsiD6igLl64",[606,608],{"title":212,"path":213,"stem":214,"description":607,"icon":215,"children":-1},"Benchmark comparison of jscpd@5 against five other copy\u002Fpaste detectors, speed and detection accuracy.",{"title":221,"path":222,"stem":223,"description":609,"icon":224,"children":-1},"How jscpd's AI reporter saves tokens compared to other CPD tools, an 8× reduction for LLM workflows.",1791302987950]