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

feat: allow blank lines and comments in dictionary.dict #756

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hippietrail
Copy link
Contributor

@hippietrail hippietrail commented Feb 23, 2025

Description

This version would support comments after any whitespace following a dictionary entry with its affix annotation on the same line.

If we do need to support words with spaces then I'll redesign this to require a comment delimiter.

How Has This Been Tested?

Fails on lints_lots_of_latin_correctly due to the dictionary containing et al. around line 49,839 as the sole dictionary entry containing a space.

Is that actually intentional and supported?

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

Fails on `lints_lots_of_latin_correctly` due to the dictionary containing `et al.` around line 49,839 as the sole dictionary entry containing a space.

Is that actually intentional and supported?

This version would support comments after any whitespace following a dictionary entry with its affix annotation on the same line.

If we do need to support words with spaces then I'll redesign this to require a comment delimiter.
@ficcdaf
Copy link
Contributor

ficcdaf commented Feb 24, 2025

Personally, I think a comment delimiter would be a good idea regardless. Results in much less ambiguity. For example, if someone opens the dictionary and sees #, they'll immediately know it's a comment. And this does leave support for words with spaces in them -- while rare, for example in case of et al. it makes sense.

@hippietrail
Copy link
Contributor Author

Personally, I think a comment delimiter would be a good idea regardless. Results in much less ambiguity. For example, if someone opens the dictionary and sees #, they'll immediately know it's a comment. And this does leave support for words with spaces in them -- while rare, for example in case of et al. it makes sense.

Yes I'm seeking clarification on the issue of terms with spaces. In tests I found I can add them arbitrarily but I can't get them suggested unless I use the term with the spaces removed, and optional some other characters removed, but not with the space in the wrong place, etc.

There are tons of terms to add if this is going to be a thing.

Only problem with the delimiter is it can also be ambiguous in that it can look like a an annotation flag. # isn't currently used but we're starting to run out and a lot is missing.

I've also started a syntax highlighter so that would also make the comments stand out. The idea is there would be a bunch of whitespace, not just one, at least locally aligned.

Which is not to say I'm closed to the idea of a delimiter (-:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants