# What's new in jscpd 5.4 and 5.4.1 Two releases in nine days, so one post for both. 5.4.0 added a language server and a way to compare two codebases, 5.4.1 rewrote `--similarity` from scratch and added `--changed`. Every example below runs on a demo folder from the [fixtures of the repository](https://github.com/kucherenko/jscpd/tree/master/fixtures){rel=""nofollow""}, so you can repeat it on your machine. ## Functions that look alike, in 15 languages A copied function rarely stays a copy. Someone renames the variables, changes a constant, adds a log line, and the token passes of jscpd lose it, they need a long run of tokens that repeats. `--similarity` is for this case. It compares whole functions by the structure of their syntax trees. jscpd normalizes every function first, the names of the functions it calls and its operators stay, local names, field names and literals become markers. Then two functions score the share of subtrees they have in common, 1.0 is the same structure, 0.8 is the default bar. Up to 5.4.0 this worked for JavaScript and TypeScript only, by the sequence of node types, and the score was loose. Now it reads JavaScript, TypeScript, Python, Java, Kotlin, Scala, C#, Go, Rust, C, C++, PHP, Ruby, Swift and Clojure, plus the code blocks of Markdown files and the scripts of Vue, Svelte and Astro components. Two Python functions, one prices a parcel, the other prices a policy. Every name and every literal differs, so the default run finds nothing, and the structure is the same: ```bash jscpd fixtures/similarity-demo/renamed # Found 0 clones. jscpd fixtures/similarity-demo/renamed --similarity # Clone found (python, similar (ast) ~1.00) # - insurance.py [1:1 - 8:26] (8 lines, 62 tokens) # shipping.py [1:1 - 8:29] # Found 1 clones. ``` An edit costs a few points. `refunds.ts` is `orders.ts` with new names and one `trace(refund.id)` call added inside the loop, the pair scores 0.85: ```bash jscpd fixtures/similarity-demo/edited --similarity # Clone found (typescript, similar (ast) ~0.85) # - orders.ts [1:8 - 14:2] (14 lines, 121 tokens) # refunds.ts [1:8 - 15:2] # Found 1 clones. ``` Called names count. Two functions with the same shape of statements that call different methods score 0.66, under the default, and show up only when you ask for 0.6: ```bash jscpd fixtures/similarity-demo/calls --similarity # Found 0 clones. jscpd fixtures/similarity-demo/calls --similarity 0.6 # Clone found (python, similar (ast) ~0.66) # - accounts.py [1:1 - 8:19] (8 lines, 62 tokens) # devices.py [1:1 - 8:18] # Found 1 clones. ``` The search is exact, it finds every pair at or above the ratio. An index of the fingerprints spares it comparing every function with every other one. On 100 open-source repositories it found the same 58,405 pairs as a brute-force run of the same method, in 65 seconds on one thread, the brute-force run took 498. Test files stay out, `--min-nodes` (20 by default) skips the tiny functions, and `--similarity 1` reports the functions with exactly the same structure. Two things to know after the update. The scores differ from 5.4.0, so a threshold or a baseline set on the old scores needs a refresh. And there is a new reporter, `-r edn`, which writes every pair with its score and the size of both trees, most similar first: ```bash jscpd fixtures/similarity-demo/renamed --similarity -r edn -o report # {:candidates [ # {:score 1.0 # :language "python" # :left {:file "insurance.py", :start-line 1, :end-line 8} # :right {:file "shipping.py", :start-line 1, :end-line 8} # :left-nodes 112 # :right-nodes 112} # ] # :clones []} ``` The guide has the whole method, with a table of what one edit does to the score - [Similar functions](https://jscpd.dev/guides/similarity). ## Only the clones of the files you changed `--changed` takes the changed files from `git status`, scans everything, and reports a clone when one of its fragments is in a changed file. The first run saves the clones of HEAD to `.jscpd-baseline.json`, and a clone HEAD did not have is marked `[NEW]`. After a commit the baseline is built again on its own. In a repository where `queue.js` is unchanged and a new `ring.js` copies its class: ```bash jscpd --changed src --no-colors --no-tips # Clone found (javascript) [NEW] # - queue.js [1:20 - 17:2] (17 lines, 112 tokens) # ring.js [1:19 - 17:2] # Found 1 clones (1 new). ``` With `--fail-on-new-clones 0` this is a pre-commit gate that fails on the clone you are about to add and keeps quiet about the old ones. `--changed-only` scans the changed files alone, it is faster and sees only the clones between them. The hook setup is in the [pre-commit guide](https://jscpd.dev/guides/pre-commit), and the demo repository is built step by step in [fixtures/changed-demo](https://github.com/kucherenko/jscpd/tree/master/fixtures/changed-demo){rel=""nofollow""}. ## jscpd in the editor `jscpd --lsp` starts jscpd as a language server. The editor sends the text as you type, after 300 ms of quiet the server tokenizes the file again from the buffer and searches its pool, and the findings come back as diagnostics that follow the text, saved or not. Clones are on by default, similar functions, semantic clones, dead code and complexity are switched on in the `lsp` section of `.jscpd.json` or from the editor settings. This is what the demo project publishes for one file, printed through headless Neovim: ```text 4 jscpd/duplicate-code Duplicated in src/holds.js:4-13 (80 tokens) 13 jscpd/similar-function Same structure as the function at src/holds.js:13-20 (1.00) 22 jscpd/complex-function Complexity 20 in loanStatus, over the limit of 15 ``` A clone comes with two code actions, go to the other copy, and ignore this clone, which wraps the fragment in `jscpd:ignore-start` and `jscpd:ignore-end`. There is a VS Code extension and a JetBrains plugin, both start the server for you and offer to download the binary when it is not on the PATH. Neovim, Helix, Sublime Text and Emacs need a few lines of config, they are in the [editors guide](https://jscpd.dev/guides/editors). ## How far a port has come `jscpd --compare source target` is for a port from one language to another, or for two implementations of one app. It pairs the functions of two folders with the semantic model and reports which functions of each side have a counterpart on the other. The demo is a billing module halfway through a port from Python to TypeScript: ```text Code 71% 5 of 7 functions in python have a counterpart in typescript 80% 4 of 5 functions in typescript have a counterpart in python Paired under other names (1): python typescript similarity billing.py:28 tax_for_region billing.ts:27 salesTax 0.87 high Only in python (2): billing.py (1) 46 due_date 6 lines shipping.py (1) 18 estimate_delivery_days 8 lines Only in typescript (1): billing.ts (1) 39 toCurrency 8 lines ``` Tests and code are measured apart, a test pairs only with a test. `-r html` draws both sides as dependency graphs with the pairs bridging them. It needs the embedding model, `jscpd --semantic-download` gets it once, 548 MB. It is experimental. On the Java and Python versions of QR-Code-generator it paired 30 of 41 Java functions with no wrong pair. Two agent skills go with it, `compare-codebases` and `code-migration`, `npx skills add kucherenko/jscpd --skill code-migration` installs one. The details are in the [compare guide](https://jscpd.dev/guides/compare). ## Smaller things - `--report-name` sets the base name of the report files, so two runs into one folder no longer overwrite each other, and the GitHub Action takes it as `report-name`. Thank you [@MannXo](https://github.com/MannXo){rel=""nofollow""}. - The MCP server takes `kinds` in every tool and has `compare_folders`, see the [agents guide](https://jscpd.dev/guides/agents). - Pairs from `--similarity` have a SARIF rule of their own, `jscpd/similar-function`. GitHub code scanning matches alerts by rule, so the first upload after the update closes the old alerts and opens the same findings under the new rule. - `--semantic` and `--compare` found functions named `if` in C, C++ and C#, a branch after `#if` was read as a function. Reported by [@MysterionRise](https://github.com/MysterionRise){rel=""nofollow""}, fixed by [@mvanhorn](https://github.com/mvanhorn){rel=""nofollow""}. - `--dead-code` reported an import used only in a TSDoc `{@link}` as unused. The readers of a [DOU.ua thread](https://dou.ua/forums/topic/62369/){rel=""nofollow""} caught it. - git commands run from a hook acted on the hook's repository, that is fixed, and an API key echoed in an embeddings error is redacted now. ## Update ```bash curl -fsSL https://jscpd.dev/install.sh | bash # or npm i -g jscpd@5 ``` The full list is in the [changelog](https://jscpd.dev/project/changelog). Most of 5.4.1 started as issues from [@pygarap](https://github.com/pygarap){rel=""nofollow""}, the structural `--similarity`, the `edn` reporter and `--changed` are his ideas. Thank you! # What's new in jscpd 5.4.2 5.4.2 adds boundary rules, makes the search for renamed copies strict about names, puts the health score into `--history` and knows 73 more formats. Every example below runs on a demo folder from the [fixtures of the repository](https://github.com/kucherenko/jscpd/tree/master/fixtures){rel=""nofollow""}, so you can repeat it on your machine. ## Keep the code of a module inside it Some code belongs in one place. In a shop that also gives loans, the backend calculates every amount it charges. A discount or a monthly payment that the web app calculates too is a second version of a backend function, and when the formula changes on the backend, the copy keeps the old one. Import linters such as dependency-cruiser or ArchUnit check who imports whom. A copied function imports nothing, so they don't see it. A boundary rule in `.jscpd.json` names the code to protect and the places its copies must stay out of: ```json { "boundaries": [ { "name": "money", "code": ["backend/pricing", "backend/loans/Interest.kt#monthlyPayment"], "notIn": ["web/**"], "allow": ["web/e2e/**"], "thresholds": { "minTokens": 30, "similarity": 0.7 } } ] } ``` `code` takes a folder, a file, a glob, or one method as `path#name`. `allow` lets the end-to-end tests keep their copy of the discount, and `thresholds` looks for smaller and looser copies than the clone report does, because for money code a missed copy costs more than a false alarm. Every clone run checks the rules. The demo web app has three copies: ```bash jscpd --config fixtures/boundaries-demo/.jscpd.json fixtures/boundaries-demo # Boundaries: # money: 3 copies outside the boundary # web/src/checkout/discount.ts:8-17 applyDiscount # copy of backend/pricing/discount.ts:6-15 applyDiscount (exact, 10 lines) # web/src/checkout/tax.ts:6-15 estimateTax # looks like backend/pricing/tax.ts:5-13 salesTax (similar (ast) ~0.84) # web/src/loan/payment.ts:4-14 monthlyPayment # looks like backend/loans/Interest.kt:8-15 monthlyPayment (semantic ~0.82) # ERROR: jscpd found 3 copies of protected code outside their boundaries (money: 3) ``` jscpd found each copy a different way. The discount is copy-paste, a token clone. The tax has other names and a debug line, and the structure comparison of `--similarity` finds it. The monthly payment is the Kotlin method written again in TypeScript: ```kotlin fun monthlyPayment(principalCents: Long, annualRatePercent: Double, months: Int): Long { if (months <= 0) return principalCents val monthlyRate = annualRatePercent / 100.0 / 12.0 if (monthlyRate == 0.0) return principalCents / months val factor = (1 + monthlyRate).pow(months) val payment = principalCents * monthlyRate * factor / (factor - 1) return payment.roundToLong() } ``` ```ts export function monthlyPayment(principal: number, yearlyRate: number, termMonths: number): number { if (termMonths <= 0) { return principal; } const r = yearlyRate / 100 / 12; if (r === 0) { return principal / termMonths; } const growth = Math.pow(1 + r, termMonths); return Math.round((principal * r * growth) / (growth - 1)); } ``` Tokens and syntax trees don't match across Kotlin and TypeScript, so the rules pair functions the way `--compare` does, with the embedding model of `--semantic`. `jscpd --semantic-download` gets it once, 548 MB. Without the model jscpd prints a warning and checks the rules without it, and here it finds the first two copies. A rule with `"disable": ["semantic"]` needs no model at all. The run exits with code 1, so a rule is a CI gate as it is. The console, ai and json reporters show the violations. Baselines, `--changed`, SARIF, the language server and the MCP server don't know about the rules yet, they come next. The [boundaries guide](https://jscpd.dev/guides/boundaries) has every key, the errors and warnings, and a CI job. ## Renamed copies that are really renamed `--ignore-identifiers` used to turn every name into the same placeholder, so any name matched any other. These two functions came out as a clone: ```python def compute(a, b, c): d = a + b * c e = d - a / b f = e * c + d ... def evaluate(x, y, z): d = x + x * x e = d - x / x f = e * x + d ... ``` They have the same shape, and the data flows through them another way. [@soodoku](https://github.com/soodoku){rel=""nofollow""} opened [an issue](https://github.com/kucherenko/jscpd/issues/1217){rel=""nofollow""} about it, with numbers from Django and scikit-learn. I checked 24 projects in 11 languages: 6,942 of their 14,501 renamed clones had no one-to-one mapping between the names. Most of them were import lists, a list matched with itself shifted by a line, or statements that only look alike. Now a name on one side has to stand for the same name on the other side every time, and two names can't stand for one: ```bash jscpd fixtures/type2-demo/consistent/python --ignore-identifiers=blind # Clone found (python, renamed) # - one.py [1:1 - 8:13] (8 lines, 54 tokens) # three.py [1:1 - 8:13] # Clone found (python, renamed) # - one.py [1:1 - 8:13] (8 lines, 54 tokens) # two.py [1:1 - 8:13] # Found 2 clones. jscpd fixtures/type2-demo/consistent/python --ignore-identifiers # Clone found (python, renamed) # - one.py [1:1 - 8:13] (8 lines, 54 tokens) # two.py [1:1 - 8:13] # Found 1 clones. ``` `two.py` renames every name of `one.py` one for one, `three.py` is `evaluate` from above, and `=blind` is the old matching. A member is a name apart from a local of the same text, so a constructor that sets `this.url = url` still matches its copy that sets `this.url = address`: the field `url` stands for the field `url`, and the parameter `url` for `address`. After the update `--ignore-identifiers` reports fewer renamed clones, and some of them are shorter, because jscpd cuts a clone where a name starts to stand for two. A baseline that 5.4 made with `--ignore-identifiers` holds the old clones. Keep `--ignore-identifiers=blind` with it or update it, otherwise `--fail-on-new-clones` counts the cut clones as new. ## The same rule in --similarity `--similarity` had the same blind spot, every local name became one marker. Now the fingerprint of a subtree also records how its names repeat. Two functions from the demo: ```python def clamp_low(values, floor): result = [] for value in values: if value < floor: value = floor result.append(value) return result def clamp_high(values, ceiling): result = [] for value in values: if ceiling < value: value = ceiling result.append(value) return result ``` They are made of the same markers, but the comparison is mirrored, so `value` would stand for `ceiling` in the `if` and for `value` in the assignment. A renamed copy of `clamp_low` still scores 1.00, and `clamp_high` scores 0.74, under the default bar of 0.8: ```bash jscpd fixtures/similarity-demo/names --similarity 0.7 # Clone found (python, similar (ast) ~0.74) # - clamp_high.py [1:1 - 7:18] (7 lines, 33 tokens) # clamp_low.py [1:1 - 7:18] # Clone found (python, similar (ast) ~1.00) # - clamp_low.py [1:1 - 7:18] (7 lines, 33 tokens) # limit_low.py [1:1 - 7:16] # Found 2 clones. ``` Fields, keyword arguments, object keys and types keep names of their own, so `self.url = url` still matches `self.url = link`. On the same 24 projects 15 of 23,530 pairs fell below 0.8, and runs take 2 to 9% longer. `--ignore-identifiers=blind` brings the old scores back. ## Health in --history `--history` scans every commit of a range and prints the trend of duplication. Now every point also gets the health score that `jscpd --health` gives its tree, and a bare `--history` walks the last 30 commits of the branch. The demo repository has four commits: a function, two copies of it, and then an import instead of one copy: ```text # COMMIT DATE FILES LINES CLONES DUP LINES DUP% CHANGE HEALTH CHANGE SUBJECT 1 3ba9acb 2026-08-01 1 11 0 0 0.0% 74 B initial helpers 2 3ac98f6 2026-08-08 2 21 1 10 47.6% +47.6 72 B -2 copy total() into b.js 3 5cec522 2026-08-15 3 31 2 20 64.5% +16.9 70 B -2 and again into c.js 4 fe3f38a 2026-08-22 2 21 1 10 47.6% -16.9 72 B +2 b.js imports total() instead 5 working 2026-10-20 2 21 1 10 47.6% = 72 B = (uncommitted changes) Trend: +47.6 points since 3ba9acb (2026-08-01) Health: -2 since 3ba9acb (2026-08-01), 74 B → 72 B: duplication 75 → 72, dead code 72 → 68, complexity 75 → 75 ``` Above the table jscpd draws two bar charts, one for duplication and one for health, and the `Health:` line says which dimension moved the score. `jscpd --health --history` and `jscpd --dashboard --history` print the badge or the dashboard first and the series under it, in the HTML report too. The walk follows first parents now, so a merged branch counts as its merge commit. The last 30 commits of axios take about 5.4 seconds, against 4.9 without the health score. The script that builds the demo repository is in [fixtures/history-demo](https://github.com/kucherenko/jscpd/tree/master/fixtures/history-demo){rel=""nofollow""}, and the options are in the [history guide](https://jscpd.dev/guides/history). ## Dockerfiles, Makefiles and 73 more formats 94 of 224 formats had no built-in extension, a gap jscpd carried over from v4, so `jscpd .` skipped Dockerfiles, Makefiles, `go.mod`, Elixir and Nix files unless you mapped them by hand. The new extensions come from GitHub Linguist, and a table of file names knows `Dockerfile`, `Containerfile`, `Makefile`, `go.mod`, `CMakeLists.txt`, `Gemfile`, `Jenkinsfile` and others: ```bash jscpd fixtures/file-names-demo # Clone found (elixir) # - lib/shop/invoice_totals.ex [4:3 - 20:4] (17 lines, 116 tokens) # lib/shop/refund_totals.ex [4:3 - 20:4] # Clone found (docker) # - services/api/Dockerfile [1:1 - 13:9] (13 lines, 94 tokens) # services/worker/Dockerfile [1:1 - 13:9] # Clone found (makefile) # - services/api/Makefile [3:1 - 21:22] (19 lines, 104 tokens) # services/worker/Makefile [3:1 - 21:22] # Found 3 clones. ``` jscpd 5.4.1 prints `Found 0 clones.` for the same folder. So the numbers of an existing setup can move: on 22 repositories `jscpd .` picked up 1 to 5 more files each, mostly Dockerfiles, `.editorconfig`, `.jsonc`, Makefiles and `go.mod`. Check a `--threshold` gate after the update. A mapping of your own in `--formats-exts` or `--formats-names` still wins. Thanks to [@pygarap](https://github.com/pygarap){rel=""nofollow""} for [the issue](https://github.com/kucherenko/jscpd/issues/1174){rel=""nofollow""}. The [supported formats](https://jscpd.dev/reference/supported-formats) page lists every name and extension. ## Smaller things - The MCP server's `check_duplication` matched no Vue, Svelte or Astro snippet, by tokens or by meaning. It splits a snippet into blocks now, the way a scan splits a file, and each match says its `format` and how many `lines` match. - A Markdown page whose front matter ran into a code fence crashed jscpd with exit code 134, and took the MCP and language servers down with it. - jscpd read a Razor view out of order, the HTML first and then the C#, so a clone across that seam ended before it started. - `--history` failed when git's `log.showSignature` was on. [@vitorcsbrito](https://github.com/vitorcsbrito){rel=""nofollow""} reported it with an exact reproduction. - `--compare` paired a function with every near-best lookalike, now a function keeps one counterpart. On Lucene and Lucene.NET the share of pairs between files of the same name went from 46% to 73%. The analysis and the numbers are from [@MysterionRise](https://github.com/MysterionRise){rel=""nofollow""}. - `--semantic` reported a page and the component it renders as a clone, a JSX element counts as a call now. Reported by [@Rosenblad](https://github.com/Rosenblad){rel=""nofollow""}, fixed by [@cristianchiriac](https://github.com/cristianchiriac){rel=""nofollow""}. - The VS Code extension couldn't open a clone in a Markdown block, because the reports named it like `guide.md:markup`. They name the file now. - Every repository counted the hook samples from `.git/hooks`, nine bash files and one perl file. jscpd skips `.git` now. ## Update ```bash curl -fsSL https://jscpd.dev/install.sh | bash # or npm i -g jscpd@5 ``` The full list is in the [changelog](https://jscpd.dev/project/changelog) and in the [release notes](https://github.com/kucherenko/jscpd/releases/tag/v5.4.2){rel=""nofollow""}. Thanks to everyone who sent an issue, a number or a fix for this release! # What's new in jscpd 5.4.3 5.4.3 is a smaller release than 5.4.2. It adds a function for Node.js scripts, shows both sides of a clone in the HTML report, and fixes things people ran into in real projects: an Action that ignored the pinned version, ignore regions that leaked, and dead-code findings that weren't dead. Most of the fixes came from issues with a reproduction and the cause, and several came with the fix too. ## Run jscpd from a Node.js script The npm package used to give you only the `jscpd` command. A script that wanted to run it started a second Node.js process with `npx jscpd`, and tools such as knip didn't see that the project uses jscpd. Now `require("jscpd")` and `import { runJscpd } from "jscpd"` give you `runJscpd(args, options)`. It finds the binary for the platform the same way the command does and returns what `spawnSync` returns: ```js import { runJscpd } from "jscpd"; const { status, stderr } = runJscpd( [process.argv[2], "--min-tokens", "25", "--threshold", "10", "--silent"], { encoding: "utf8" } ); if (status !== 0) { console.error(stderr.trim()); process.exit(status); } console.log("duplication is under 10%"); ``` ```bash node check.mjs src # ERROR: jscpd found too many duplicates (50.0%) over threshold (10.0%) ``` Where the command prints an error and exits, for example on a platform without a prebuilt binary, the function throws an `Error` with the same message and `code === "JSCPD_NO_BINARY"`. The types are in `index.d.ts`. Detection still runs in the Rust binary only, so this is a way to start it, not the v4 `jscpd()` API. [@abrahamguo](https://github.com/abrahamguo){rel=""nofollow""} wrote it ([#1238](https://github.com/kucherenko/jscpd/pull/1238){rel=""nofollow""}), and the next release adds `getJscpdReport()` from the same author, which returns the parsed JSON report. ## Both sides of a clone in the HTML report "Show code" in the HTML report opened only the first fragment, so to see what it was a copy of you went to the other file yourself. Now it opens both fragments side by side, or one above the other on a narrow screen. Each fragment sits under its file name with line numbers, and a long line scrolls inside its own pane. The report highlights the code with Prism again, as the v4 report did, and inlines only the languages it shows, so the file stays small: the report below is 27 KB. ```bash jscpd --reporters html fixtures/file-names-demo # HTML report saved to report/jscpd-report.html ``` [Open the report](https://jscpd.dev/examples/html-report-demo.html) of the file names demo: three clones, in Elixir, in a Dockerfile and in a Makefile. Thanks to [@crystalfp](https://github.com/crystalfp){rel=""nofollow""} for [the issue](https://github.com/kucherenko/jscpd/issues/1263){rel=""nofollow""}. ## Pinning the Action pins jscpd The `version` input of the GitHub Action defaulted to `latest`. So this workflow installed jscpd 5.4.2 the day 5.4.2 came out, even though it pins the Action to 5.4.1: ```yaml - uses: kucherenko/jscpd@v5.4.1 with: path: src ``` From v5.4.3 on, an empty `version` installs the release that the Action's own ref belongs to. Pin `kucherenko/jscpd@v5.4.3` or its commit SHA, and you get jscpd 5.4.3 until you move the pin, and a Dependabot bump of the Action updates both. `version: latest` still installs the newest release, and `@v5` keeps following the latest 5.x as before. Older tags can't learn this, so `@v5.4.1` still installs the newest jscpd. Reported by [@dannystaple](https://github.com/dannystaple){rel=""nofollow""}, fixed by [@sarankumar1325](https://github.com/sarankumar1325){rel=""nofollow""} ([#1240](https://github.com/kucherenko/jscpd/issues/1240){rel=""nofollow""}, [#1249](https://github.com/kucherenko/jscpd/pull/1249){rel=""nofollow""}). ## jscpd\:ignore regions with `/*` in a string Here is a list of routes between ignore markers, and a test fixture with the same list: ```ts /* jscpd:ignore-start */ export const PROTECTED_ROUTES = [ { path: "/api/auth/organization/*", roles: ["owner", "admin"], audit: true }, { path: "/api/auth/members/*", roles: ["owner", "admin"], audit: true }, { path: "/api/billing/invoices/*", roles: ["owner", "billing"], audit: true }, { path: "/api/billing/cards/*", roles: ["owner", "billing"], audit: false }, ]; /* jscpd:ignore-end */ ``` jscpd 5.4.2 reported the region anyway: ```bash jscpd --min-tokens 25 --min-lines 3 . # Clone found (typescript) # - src/auth/routes.ts [3:37 - 7:3] (5 lines, 70 tokens) # test/routes.fixture.ts [2:37 - 6:3] # Found 1 clones. ``` The JavaScript and TypeScript tokenizer looked for the markers with a byte scan that took every `/*` for the start of a comment, the one in `"/api/auth/organization/*"` too. That fake comment ran to the next `*/`, the one that closes `jscpd:ignore-end`, so the region ended at the first route. 5.4.3 finds the markers by their text, as the other languages do, and prints `Found 0 clones.` Markers inside template literals, such as the CSS of a styled component, work as before. [@bauchdj](https://github.com/bauchdj){rel=""nofollow""} found it in a data file of URL globs that gave 126 clones, and sent the cause; [@sarankumar1325](https://github.com/sarankumar1325){rel=""nofollow""} fixed it ([#1257](https://github.com/kucherenko/jscpd/issues/1257){rel=""nofollow""}, [#1258](https://github.com/kucherenko/jscpd/pull/1258){rel=""nofollow""}). ## "Ignore this clone" in JSX The language server's "Ignore this clone" action wrote `// jscpd:ignore-start` among JSX children, where the page renders it as text, and it could put a marker inside a tag, which TypeScript can't parse. Now it writes markers that JSX accepts and keeps them outside of tags: ```tsx ``` When the clone starts or ends inside a tag, the start marker goes before the tag and the end marker after it. Each copy of a `--cross-formats` clone gets the comment syntax of its own file, and the `