@@ -36,6 +36,7 @@ type docChunkStructure struct {
3636 tagCounts map [string ]int
3737 headingLevels []int
3838 listShapes []markdownListShape
39+ listMarkerPrefixes []string
3940 inlineCodeSpans []string
4041 linkDestinations []string
4142 protectedLinkLabels []string
@@ -97,6 +98,9 @@ func validateDocBodyFencedLiterals(source, translated string) error {
9798 if ! slices .Equal (sourceStructure .listShapes , translatedStructure .listShapes ) {
9899 return fmt .Errorf ("list structure mismatch: source=%v translated=%v" , sourceStructure .listShapes , translatedStructure .listShapes )
99100 }
101+ if ! slices .Equal (sourceStructure .listMarkerPrefixes , translatedStructure .listMarkerPrefixes ) {
102+ return fmt .Errorf ("list marker structure mismatch: source=%q translated=%q" , sourceStructure .listMarkerPrefixes , translatedStructure .listMarkerPrefixes )
103+ }
100104 if ! sameStringMultiset (sourceStructure .inlineCodeSpans , translatedStructure .inlineCodeSpans ) {
101105 return fmt .Errorf ("inline code mismatch: source=%d translated=%d" , len (sourceStructure .inlineCodeSpans ), len (translatedStructure .inlineCodeSpans ))
102106 }
@@ -291,6 +295,9 @@ func validateDocChunkTranslation(source, translated string) error {
291295 if ! slices .Equal (sourceStructure .listShapes , translatedStructure .listShapes ) {
292296 return fmt .Errorf ("list structure mismatch: source=%v translated=%v" , sourceStructure .listShapes , translatedStructure .listShapes )
293297 }
298+ if ! slices .Equal (sourceStructure .listMarkerPrefixes , translatedStructure .listMarkerPrefixes ) {
299+ return fmt .Errorf ("list marker structure mismatch: source=%q translated=%q" , sourceStructure .listMarkerPrefixes , translatedStructure .listMarkerPrefixes )
300+ }
294301 if ! sameStringMultiset (sourceStructure .inlineCodeSpans , translatedStructure .inlineCodeSpans ) {
295302 return fmt .Errorf ("inline code mismatch: source=%d translated=%d" , len (sourceStructure .inlineCodeSpans ), len (translatedStructure .inlineCodeSpans ))
296303 }
@@ -497,6 +504,7 @@ func summarizeDocChunkStructure(text string) docChunkStructure {
497504 tagCounts : countsWithoutFence (counts ),
498505 headingLevels : extractMarkdownHeadingLevels (text ),
499506 listShapes : extractMarkdownListShapes (text ),
507+ listMarkerPrefixes : extractMarkdownListMarkerPrefixes (text ),
500508 inlineCodeSpans : extractMarkdownInlineCodeValues (text ),
501509 linkDestinations : extractMarkdownLinkDestinations (text ),
502510 protectedLinkLabels : extractProtectedMarkdownLinkLabels (text ),
0 commit comments