This is a refactor of the current build span logic.
If this is merged, the next step will be rewriting the _bind() method.
My goal is by making the _bind() method returns a List of String and int values,
then we can tell if it's an int, it is a word that should be highlighted.
No more int.tryParse() in the _buildSpan() method, so that users can pass any text into this plugin, including the | character and numbers.
But I might not be smart enough to fully understand the original implementation, so you may want to check it carefully.
This is a refactor of the current build span logic. If this is merged, the next step will be rewriting the
_bind()
method. My goal is by making the_bind()
method returns a List ofString
andint
values, then we can tell if it's anint
, it is a word that should be highlighted. No moreint.tryParse()
in the_buildSpan()
method, so that users can pass any text into this plugin, including the|
character and numbers.But I might not be smart enough to fully understand the original implementation, so you may want to check it carefully.