Keep match boundaries for exempt glossary names
This commit is contained in:
@@ -50,7 +50,9 @@ func ExecuteModuleProposal(ctx context.Context, req ModuleProposalRequest) (cont
|
||||
|
||||
protected := make([]string, 0, len(req.ProposalRequest.ProtectedTerms))
|
||||
for _, term := range req.ProposalRequest.ProtectedTerms {
|
||||
protected = append(protected, term.Spelling)
|
||||
if !term.Exempt {
|
||||
protected = append(protected, term.Spelling)
|
||||
}
|
||||
}
|
||||
payload, err := json.Marshal(protected)
|
||||
if err != nil {
|
||||
|
||||
@@ -40,7 +40,7 @@ func TestExecuteModuleProposalBuildsMessagesFromSectionAndDescription(t *testing
|
||||
Settings: cfg,
|
||||
WorkingTranscript: transcript,
|
||||
Glossary: glossary,
|
||||
ProtectedTerms: []domain.Term{{Spelling: "Separate protection"}},
|
||||
ProtectedTerms: []domain.Term{{Spelling: "Separate protection"}, {Spelling: "Exempt boundary", Exempt: true}},
|
||||
Section: §ion,
|
||||
},
|
||||
RunSpec: contracts.ModuleRunSpec{
|
||||
|
||||
Reference in New Issue
Block a user