Skip to content

Conversation

semiversus
Copy link

The given regex pattern is matching "{: ... }" and also "{ ... }" (without the colon). The documentation is not mentioning this possibility and I had problems in inline elements where I use "{ ... }". I think the pattern "{:" is wisely chosen to prevent such a false detection.

The given regex pattern is matching "{: ... }" and also "{ ... }" (without the colon). The documentation is not mentioning this possibility and I had problems in inline elements where I use "{ ... }". I think the pattern "{:" is wisely chosen to prevent such a false detection.
@semiversus
Copy link
Author

Ok, may be not that good idea... There are unit tests checking for working "{ ... }" . But why?

@semiversus semiversus closed this May 28, 2016
@waylan
Copy link
Member

waylan commented May 28, 2016

I forget the specific reason now, but if memory serves me right, there are other implementations which use both, so we accept both to be compatible with as many others as possible.

@semiversus
Copy link
Author

Is it a good idea to add a parameter to the attr_list extension for specifying a strict mode?
Like attr_list(strict=True). In this mode only '{: ... }' is recognized. I'm willing to do the changes of implementation, unit test and documentation. At least the '{ ... }' pattern should be mentioned in documentation.

@waylan
Copy link
Member

waylan commented May 30, 2016

Is it a good idea to add a parameter to the attr_list extension for specifying a strict mode?
Like attr_list(strict=True).

Probably, however, given we are in a feature freeze right now, such a feature would not be added until 3.0, when each extension will be broken out into its own separate package.

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