You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using inline codespans in markdown mode, eg:
"Navigate to `/path/to/file` in your directory"
Gramma incorrectly identifies a double space, ie. the one before and the one after the code span.
A similar error occurs with commas, eg:
"Does Go have arithmetic operators like `++`, `+=`, `*=` or `--`?"
It appears that Gramma is stripping the codespan from the string before analysis, without accounting for the fact that something else was there. See the sentence field in the result below.
To Reproduce
Minimal reproduction (NodeJS)
constgramma=require("gramma");constoptions={language: "en-GB",dictionary: ["npm","gramma"],markdown: true,};conststring="Delete the `loginResult` variable.";gramma.check(string,options).then((results)=>console.log(results.matches));
Expected behavior
No errors should be found in this text.
Actual behaviour
[{message: 'It seems like there are too many consecutive spaces here.',shortMessage: '',replacements: [[Object]],offset: 10,length: 15,context: {text: 'Delete the `loginResult` variable.',offset: 10,length: 15},sentence: 'Delete the variable.',type: {typeName: 'Other'},rule: {id: 'CONSECUTIVE_SPACES',subId: '1',sourceFile: 'grammar.xml',description: 'Two consecutive spaces',issueType: 'typographical',category: [Object],isPremium: false,confidence: 0.47},ignoreForIncompleteSentence: true,contextForSureMatch: -1,word: ' `loginResult` '}]
Desktop (please complete the following information):
OS: MacOS
Gramma version: 1.6.0
The text was updated successfully, but these errors were encountered:
Describe the bug
When using inline codespans in markdown mode, eg:
Gramma incorrectly identifies a double space, ie. the one before and the one after the code span.
A similar error occurs with commas, eg:
It appears that Gramma is stripping the codespan from the string before analysis, without accounting for the fact that something else was there. See the
sentence
field in the result below.To Reproduce
Minimal reproduction (NodeJS)
Expected behavior
No errors should be found in this text.
Actual behaviour
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: