antonWetzel / typst-languagetool

LanguageTool Integration for Typst for spell and grammer check
MIT License
37 stars 9 forks source link

A false positive "possible spelling mistake" #11

Closed Andrew15-5 closed 7 months ago

Andrew15-5 commented 8 months ago

This works ok:

#diagram({
  node(e1)[Something][1]
  node(e2)[Something][2]
})

This does not:

#diagram({
  node(e1)[Something][]
  node(e2)[Something][]
})
Possible spelling mistake found. [MORFOLOGIK_RULE_EN_US]

image

Andrew15-5 commented 8 months ago

Nope, this also gives the same error:

#diagram({
  node(e1)[Something]
  node(e2)[Something]
})
antonWetzel commented 8 months ago

At the moment the default between content blocks is nothing.

To fix this error the rule

"functions": {
  "node": {
    "after_argument": "\n\n", // seperate arguments by one empty line
  },
},

should work.

At the moment custom rules overwrite the default rules, so table, ... will error. I don't want to add rules for not core functions, but maybe I will for default packges in the future.

I am working on some context system, where seperators like top-level -> "" or diagram.* -> "\n\n" are possible.

antonWetzel commented 7 months ago

Spellchecking is now after the document compilation, so this should not happen anymore. If the issue still exits, please reopen the issue.