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

Optimize matching for CSS completion queries #4979

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

matthiasblaesing
Copy link
Contributor

There are two different issues:

  • The documentation is fetched based on the completion result. This was only build based on the prefix. This change sorts the completion result using the node image where the cursor is currently located and sort by levenshtein distance between this image and the completion proposal. This result in preferring better matching entries.

  • The documentation is looked up from the W3C specificiation HTML files. To do this the correct location is located using several regular expressions. To make this more precise a less flexible regexp is used. The other matches are retained and used as fallbacks.

Closes: #4778

There are two different issues:

- The documentation is fetched based on the completion result. This was
  only build based on the prefix. This change sorts the completion
  result using the node image where the cursor is currently located and
  sort by levenshtein distance between this image and the completion
  proposal. This result in preferring better matching entries.

- The documentation is looked up from the W3C specificiation HTML
  files. To do this the correct location is located using several
  regular expressions. To make this more precise a less flexible
  regexp is used. The other matches are retained and used as fallbacks.

Closes: apache#4778
@matthiasblaesing matthiasblaesing added the CSS [ci] enable web job label Nov 16, 2022
@matthiasblaesing matthiasblaesing added this to the NB17 milestone Nov 16, 2022
@matthiasblaesing
Copy link
Contributor Author

@matthiasblaesing matthiasblaesing merged commit 0618061 into apache:master Nov 25, 2022
@matthiasblaesing matthiasblaesing deleted the css_documentation branch November 27, 2022 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS [ci] enable web job
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS: Show documentation (ctrl+shift+space) displays incorrect documentation
2 participants