]*>(.*?)<\/a>/gs;
-var TS_NAME_RE = /^ts_(\d+)_(\d+)_(\w*)$/;
+var TS_NAME_RE = /^ts_(\d+)_(\d+)_(.*)$/;
var DISPLAY_TS_RE = /^\[\d{2}:\d{2}:\d{2}\]$/;
var SPEAKER_RE = /^(.+?)\s*:\s*/;
var ALL_TAGS_RE2 = /<[^>]+>/g;
diff --git a/manifest.json b/manifest.json
index 41bdd70..5208b15 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"id": "pseudonymizer-tool",
"name": "Pseudonymizer Tool",
- "version": "0.1.7",
+ "version": "0.1.8",
"minAppVersion": "1.13.0",
"description": "Pseudonymize and correct interactional transcripts (Jefferson, ICOR, SRT, CHAT/CHA). Designed for qualitative researchers in linguistics and conversation analysis.",
"author": "Axelle Abbadie",
diff --git a/package.json b/package.json
index 7f26180..ed0925a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pseudonymizer-tool",
- "version": "0.1.7",
+ "version": "0.1.8",
"description": "Obsidian plugin for pseudonymizing and correcting interactional transcripts (Jefferson, ICOR, SRT, CHAT/CHA).",
"author": "Axelle Abbadie",
"homepage": "https://cv.hal.science/axelle-abbadie/",
diff --git a/src/parsers/NoScribeHtmlParser.ts b/src/parsers/NoScribeHtmlParser.ts
index 264703f..305acba 100644
--- a/src/parsers/NoScribeHtmlParser.ts
+++ b/src/parsers/NoScribeHtmlParser.ts
@@ -16,7 +16,11 @@ import type { VttDocument, VttCue, VttWord } from './VttParser';
const PARA_RE = /]*)?>(?.*?)<\/p>/gs;
const ANCHOR_RE = /]*>(.*?)<\/a>/gs;
-const TS_NAME_RE = /^ts_(\d+)_(\d+)_(\w*)$/;
+// Le suffixe après START_END est censé être l'id de locuteur (S00, S01...), mais
+// noScribe peut y injecter des caractères arbitraires si l'utilisateur a tapé une
+// annotation de chevauchement (ex. "//S01:") juste avant une coupure de segment —
+// accepter n'importe quel caractère pour ne pas perdre le segment (cf. bug import HTML).
+const TS_NAME_RE = /^ts_(\d+)_(\d+)_(.*)$/;
// Timestamps d'affichage [HH:MM:SS] générés par noScribe pour l'interface — ignorer
const DISPLAY_TS_RE = /^\[\d{2}:\d{2}:\d{2}\]$/;
// Locuteur suivi de " :" en début de texte
diff --git a/tests/unit/NoScribeHtmlParser.test.ts b/tests/unit/NoScribeHtmlParser.test.ts
index 678b54c..7a4fbff 100644
--- a/tests/unit/NoScribeHtmlParser.test.ts
+++ b/tests/unit/NoScribeHtmlParser.test.ts
@@ -102,3 +102,40 @@ describe('NoScribeHtmlParser — parse', () => {
expect(turn.text).not.toMatch(/\[\d{2}:\d{2}:\d{2}\]/);
});
});
+
+// ---- Régression : ancres avec suffixe de locuteur non standard --------------
+// Quand l'utilisatrice tape une annotation de chevauchement ("//S01: ...") juste
+// avant une coupure de segment noScribe, le nom d'ancre généré peut contenir ce
+// texte dans le suffixe (ex. "ts_95480_96512_//S01" au lieu de "ts_95480_96512_S01").
+// Avant le correctif, TS_NAME_RE (`\w*`) rejetait ces ancres et le texte entier
+// du segment disparaissait silencieusement.
+
+const NOSCRIBE_HTML_OVERLAP = `
+
+
+
+
+
+`;
+
+describe('NoScribeHtmlParser — ancres avec suffixe non standard (chevauchements)', () => {
+ test('ne perd pas le texte des ancres dont le suffixe contient des caractères hors \\w', () => {
+ const doc = parser.parse(NOSCRIBE_HTML_OVERLAP);
+ expect(doc.cues.length).toBe(1);
+ const turn = doc.cues[0];
+ expect(turn.text).toContain('Bon, maintenant, je le fais');
+ expect(turn.text).toContain("C'était par flemme");
+ expect(turn.text).toContain('Ça a été, vous y arrivez');
+ });
+
+ test('conserve le timing correct malgré le suffixe non standard', () => {
+ const doc = parser.parse(NOSCRIBE_HTML_OVERLAP);
+ const turn = doc.cues[0];
+ expect(turn.startTime).toBe('00:01:30.660');
+ expect(turn.endTime).toBe('00:01:47.904');
+ });
+});
diff --git a/versions.json b/versions.json
index 5ee063a..a8a3521 100644
--- a/versions.json
+++ b/versions.json
@@ -12,5 +12,6 @@
"0.1.4": "1.7.2",
"0.1.5": "1.7.2",
"0.1.6": "1.7.2",
- "0.1.7": "1.13.0"
+ "0.1.7": "1.13.0",
+ "0.1.8": "1.13.0"
}
\ No newline at end of file