[{"data":1,"prerenderedAt":624},["ShallowReactive",2],{"navigation_docs":3,"-project-benchmarks-cross-format":249,"-project-benchmarks-cross-format-surround":615,"page-views-\u002Fproject\u002Fbenchmarks\u002Fcross-format":620},[4,29,104,124,194],{"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,94,99],{"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,"path":96,"stem":97,"icon":98},"Similar functions","\u002Fguides\u002Fsimilarity","2.guides\u002F13.similarity","i-lucide-list-tree",{"title":100,"path":101,"stem":102,"icon":103},"Boundaries","\u002Fguides\u002Fboundaries","2.guides\u002F14.boundaries","i-lucide-fence",{"title":105,"icon":6,"path":106,"stem":107,"children":108,"page":6},"Concepts","\u002Fconcepts","3.concepts",[109,114,119],{"title":110,"path":111,"stem":112,"icon":113},"Types of code clones","\u002Fconcepts\u002Fclone-types","3.concepts\u002F1.clone-types","i-lucide-copy",{"title":115,"path":116,"stem":117,"icon":118},"How detection works","\u002Fconcepts\u002Fhow-detection-works","3.concepts\u002F2.how-detection-works","i-lucide-scan-search",{"title":120,"path":121,"stem":122,"icon":123},"The health score","\u002Fconcepts\u002Fhealth-score","3.concepts\u002F3.health-score","i-lucide-heart-pulse",{"title":125,"icon":6,"path":126,"stem":127,"children":128,"page":6},"Reference","\u002Freference","4.reference",[129,134,139,144,181,186,190],{"title":130,"path":131,"stem":132,"icon":133},"CLI options","\u002Freference\u002Fcli","4.reference\u002F1.cli","i-lucide-terminal",{"title":135,"path":136,"stem":137,"icon":138},"The config file","\u002Freference\u002Fconfig-file","4.reference\u002F2.config-file","i-lucide-settings",{"title":140,"path":141,"stem":142,"icon":143},"Exit codes","\u002Freference\u002Fexit-codes","4.reference\u002F3.exit-codes","i-lucide-log-out",{"title":145,"icon":6,"path":146,"stem":147,"children":148},"Reporters","\u002Freference\u002Freporters","4.reference\u002F4.reporters\u002Findex",[149,151,156,161,166,171,176],{"title":145,"path":146,"stem":147,"icon":150},"i-lucide-file-chart-column",{"title":152,"path":153,"stem":154,"icon":155},"HTML reporter","\u002Freference\u002Freporters\u002Fhtml","4.reference\u002F4.reporters\u002F2.html","i-lucide-file-code",{"title":157,"path":158,"stem":159,"icon":160},"JSON reporter","\u002Freference\u002Freporters\u002Fjson","4.reference\u002F4.reporters\u002F3.json","i-lucide-braces",{"title":162,"path":163,"stem":164,"icon":165},"Badge reporter","\u002Freference\u002Freporters\u002Fbadge","4.reference\u002F4.reporters\u002F4.badge","i-lucide-award",{"title":167,"path":168,"stem":169,"icon":170},"SARIF reporter","\u002Freference\u002Freporters\u002Fsarif","4.reference\u002F4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":172,"path":173,"stem":174,"icon":175},"CodeClimate reporter","\u002Freference\u002Freporters\u002Fcodeclimate","4.reference\u002F4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":177,"path":178,"stem":179,"icon":180},"OpenMetrics reporter","\u002Freference\u002Freporters\u002Fopenmetrics","4.reference\u002F4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":182,"path":183,"stem":184,"icon":185},"Supported formats","\u002Freference\u002Fsupported-formats","4.reference\u002F5.supported-formats","i-lucide-languages",{"title":187,"path":188,"stem":189,"icon":38},"GitHub Action","\u002Freference\u002Fgithub-action","4.reference\u002F6.github-action",{"title":191,"path":192,"stem":193,"icon":68},"Rust crates","\u002Freference\u002Frust-crates","4.reference\u002F7.rust-crates",{"title":195,"icon":6,"path":196,"stem":197,"children":198,"page":6},"Project","\u002Fproject","5.project",[199,204,209,214,239,244],{"title":200,"path":201,"stem":202,"icon":203},"Changelog","\u002Fproject\u002Fchangelog","5.project\u002F1.changelog","i-lucide-scroll-text",{"title":205,"path":206,"stem":207,"icon":208},"Migrating from v4 to v5","\u002Fproject\u002Fmigration","5.project\u002F2.migration","i-lucide-arrow-right-left",{"title":210,"path":211,"stem":212,"icon":213},"jscpd v4 (TypeScript)","\u002Fproject\u002Fv4","5.project\u002F3.v4","i-simple-icons-typescript",{"title":215,"icon":6,"path":216,"stem":217,"children":218},"Benchmarks","\u002Fproject\u002Fbenchmarks","5.project\u002F4.benchmarks\u002Findex",[219,221,226,230,235],{"title":215,"path":216,"stem":217,"icon":220},"i-lucide-gauge",{"title":222,"path":223,"stem":224,"icon":225},"Detection Speed","\u002Fproject\u002Fbenchmarks\u002Fdetection-speed","5.project\u002F4.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":227,"path":228,"stem":229,"icon":58},"Multi-Format Detection","\u002Fproject\u002Fbenchmarks\u002Fcross-format","5.project\u002F4.benchmarks\u002F3.cross-format",{"title":231,"path":232,"stem":233,"icon":234},"AI Token Efficiency","\u002Fproject\u002Fbenchmarks\u002Fai-token-efficiency","5.project\u002F4.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":236,"path":237,"stem":238,"icon":93},"Embedding Models","\u002Fproject\u002Fbenchmarks\u002Fembedding-models","5.project\u002F4.benchmarks\u002F5.embedding-models",{"title":240,"path":241,"stem":242,"icon":243},"Research","\u002Fproject\u002Fresearch","5.project\u002F5.research","i-lucide-graduation-cap",{"title":245,"path":246,"stem":247,"icon":248},"Articles","\u002Fproject\u002Farticles","5.project\u002F6.articles","i-lucide-newspaper",{"id":250,"title":227,"body":251,"description":606,"extension":607,"links":608,"meta":609,"navigation":610,"path":228,"seo":611,"stem":229,"__hash__":614},"docs\u002F5.project\u002F4.benchmarks\u002F3.cross-format.md",{"type":252,"value":253,"toc":597},"minimark",[254,283,288],[255,256,257,258,262,263,262,266,269,270,273,274,278,279,282],"p",{},"Component file formats (",[259,260,261],"code",{},".vue",", ",[259,264,265],{},".svelte",[259,267,268],{},".astro",") and rich documents (",[259,271,272],{},".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 ",[275,276,277],"strong",{},"within"," each embedded language and ",[275,280,281],{},"across"," different file formats sharing the same code.",[284,285,287],"h2",{"id":286},"format-support-overview","Format Support Overview",[289,290,291,295,298,405,409,419,506,510,546,550,586],"benchmark-cross-format",{},[284,292,294],{"id":293},"cross-format-detection-svelte-astro","Cross-Format Detection (Svelte ↔ Astro)",[255,296,297],{},"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).",[299,300,301,320],"table",{},[302,303,304],"thead",{},[305,306,307,311,314,317],"tr",{},[308,309,310],"th",{},"Tool",[308,312,313],{},"Cross-Format Clones",[308,315,316],{},"Lines",[308,318,319],{},"Detail",[321,322,323,338,352,366,380,393],"tbody",{},[305,324,325,329,332,335],{},[326,327,328],"td",{},"jscpd-rs",[326,330,331],{},"4",[326,333,334],{},"235",[326,336,337],{},"CSS (46 lines) + markup (7, 46, 136 lines)",[305,339,340,343,346,349],{},[326,341,342],{},"jscpd@5",[326,344,345],{},"2",[326,347,348],{},"53",[326,350,351],{},"CSS (46 lines) + markup (7 lines)",[305,353,354,357,360,363],{},[326,355,356],{},"Duplo",[326,358,359],{},"8",[326,361,362],{},"92",[326,364,365],{},"Raw text matches, no language attribution",[305,367,368,371,374,377],{},[326,369,370],{},"Simian",[326,372,373],{},"1+",[326,375,376],{},"—",[326,378,379],{},"Aggregate text blocks, no language attribution",[305,381,382,385,388,390],{},[326,383,384],{},"PMD CPD",[326,386,387],{},"0",[326,389,387],{},[326,391,392],{},"Cannot detect cross-format duplicates",[305,394,395,398,400,402],{},[326,396,397],{},"Fallow",[326,399,387],{},[326,401,387],{},[326,403,404],{},"JS\u002FTS only",[284,406,408],{"id":407},"markdown-embedded-code-detection","Markdown Embedded-Code Detection",[255,410,411,414,415,418],{},[259,412,413],{},"file3.md"," and ",[259,416,417],{},"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.",[299,420,421,435],{},[302,422,423],{},[305,424,425,427,430,433],{},[308,426,310],{},[308,428,429],{},"Detected Embedded Languages",[308,431,432],{},"Clones",[308,434,316],{},[321,436,437,450,462,475,486,496],{},[305,438,439,441,444,447],{},[326,440,342],{},[326,442,443],{},"TypeScript, Python, YAML, Markdown",[326,445,446],{},"7",[326,448,449],{},"356",[305,451,452,454,457,459],{},[326,453,328],{},[326,455,456],{},"TypeScript, Python, YAML, Markdown, Coffeescript",[326,458,359],{},[326,460,461],{},"350",[305,463,464,466,469,472],{},[326,465,356],{},[326,467,468],{},"(flat text only)",[326,470,471],{},"5",[326,473,474],{},"195",[305,476,477,479,481,483],{},[326,478,370],{},[326,480,468],{},[326,482,331],{},[326,484,485],{},"219",[305,487,488,490,492,494],{},[326,489,384],{},[326,491,376],{},[326,493,387],{},[326,495,387],{},[305,497,498,500,502,504],{},[326,499,397],{},[326,501,376],{},[326,503,387],{},[326,505,387],{},[284,507,509],{"id":508},"key-findings","Key Findings",[511,512,513,530,536,541],"ul",{},[514,515,516,519,520,262,522,262,524,526,527,529],"li",{},[275,517,518],{},"All jscpd variants"," parse ",[259,521,261],{},[259,523,265],{},[259,525,268],{},", and ",[259,528,272],{}," 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).",[514,531,532,535],{},[275,533,534],{},"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.",[514,537,538,540],{},[275,539,384],{}," cannot detect cross-format duplicates at all. It processes each language independently and has no concept of component file structure.",[514,542,543,545],{},[275,544,397],{}," only analyzes JS\u002FTS, so it misses all CSS, template, and Markdown duplicates across formats.",[284,547,549],{"id":548},"methodology","Methodology",[511,551,552,562,568,574,580],{},[514,553,554,557,558,561],{},[275,555,556],{},"Target:"," ",[259,559,560],{},"fixtures\u002F"," directory — 547 files, 21,645 lines across 150+ language formats",[514,563,564,567],{},[275,565,566],{},"Within-format clones:"," Duplicates detected within the same file type (e.g., Svelte→Svelte)",[514,569,570,573],{},[275,571,572],{},"Cross-format clones:"," Duplicates detected across different file types (e.g., Svelte↔Astro)",[514,575,576,579],{},[275,577,578],{},"Embedded-code detection:"," Duplicates found inside embedded language blocks within multi-language files",[514,581,582,585],{},[275,583,584],{},"Hardware:"," Apple Silicon (Darwin arm64)",[255,587,588,589,596],{},"Full methodology details are in the ",[590,591,595],"a",{"href":592,"rel":593},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Fblob\u002Fmaster\u002Fbenchmark\u002FBENCHMARK.md",[594],"nofollow","jscpd repository",".",{"title":598,"searchDepth":599,"depth":599,"links":600},"",2,[601,602,603,604,605],{"id":286,"depth":599,"text":287},{"id":293,"depth":599,"text":294},{"id":407,"depth":599,"text":408},{"id":508,"depth":599,"text":509},{"id":548,"depth":599,"text":549},"How jscpd detects duplicates across Svelte, Astro, Vue, and Markdown formats — vs other tools.","md",null,{},{"icon":58},{"title":612,"description":613},"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",[616,618],{"title":222,"path":223,"stem":224,"description":617,"icon":225,"children":-1},"Benchmark comparison of jscpd@5 against five other copy\u002Fpaste detectors, speed and detection accuracy.",{"title":231,"path":232,"stem":233,"description":619,"icon":234,"children":-1},"How jscpd's AI reporter saves tokens compared to other CPD tools, an 8× reduction for LLM workflows.",{"\u002Fproject\u002Fbenchmarks\u002Fcross-format":621},{"views":622,"visits":623},46,18,1795510273471]