Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed custom rule highlights incorrect column #768

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docker/customHtmlRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ exports.addCustomHtmlRule = async (apiToken, url) => {

// Make sure the character has space and is not part of a long single string
if (pageContent.indexOf(' ') >= 0) {
const col = event.col + contentIndex;
if (contentIndex >= 0) {
reporter.warn(
"Incorrect Scrum term: '" + i + "'.",
event.line,
event.col,
col,
self,
event.raw
);
Expand Down Expand Up @@ -479,10 +480,11 @@ exports.addCustomHtmlRule = async (apiToken, url) => {
// Make sure the character has space and is not part of a long single string
if (pageContent.indexOf(' ') >= 0) {
if (contentIndex >= 0) {
const col = event.col + contentIndex;
reporter.warn(
"Incorrect terms: '" + i + "'.",
event.line,
event.col,
col,
self,
event.raw
);
Expand Down
Loading