Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Weight modifier #49

Closed
char101 opened this Issue · 2 comments

2 participants

@char101

Hi,

Could you add a parameter to the rule definition that can modify the rule weight, such as

{at: '...', 'char': '...', input: '...', 'weight': 5} -> rule weight = 5 + original weight

. This is required because sometimes the number of character in the regexp does not correlate to the specificity of the regexp

For example

\%#} is more specific than \%#\s*}
@kana
Owner

Thank you for the idea. I know that there are several situations to control the priorities of rules explicitly. But I want to polish the plugin to make it more stable at the moment. So I do no plan to add such a feature soon.

If you still want to control the priorities of rules, add meaningless patterns to at values. For example, use \%#}\ze\ze instead of \%#} to make rules more specific than \%#\s*}.

@char101

Okay, thank you for the hint.

@char101 char101 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.