Skip to content

Commit

Permalink
🐛 don't just get innerText
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad committed Feb 13, 2024
1 parent 13b8f13 commit 08e91c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion provider/internal/builtin/service_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ func (p *builtinServiceClient) Evaluate(ctx context.Context, cap string, conditi
"data": node.Data,
},
}
location, err := p.getLocation(ctx, ab, node.InnerText())
content := strings.Trim(node.InnerText(), " ")
content = strings.Trim(content, "\n")
if content == "" {
content = node.Data
}
location, err := p.getLocation(ctx, ab, content)
if err == nil {
incident.CodeLocation = &location
lineNo := int(location.StartPosition.Line)
Expand Down

0 comments on commit 08e91c0

Please sign in to comment.