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

Skipping unknown shortcodes #13

Merged
merged 7 commits into from
Dec 12, 2020
Merged

Conversation

sebastienros
Copy link
Owner

@sebastienros
Copy link
Owner Author

@deanmarcussen opinion on the new behavior?

@deanmarcussen
Copy link
Collaborator

New behaviour sounds good.

No weirdness with nesting? i.e. some found, some not found?

@sebastienros
Copy link
Owner Author

sebastienros commented Dec 11, 2020

New tests:
[hello] -> "Hello world!"
[upper] -> ToUpperCase
other tags not defined

        [InlineData("[hello][foo]", "Hello world![foo]")]
        [InlineData("[hello  ][foo]", "Hello world![foo]")]
        [InlineData("[foo][hello]", "[foo]Hello world!")]
        [InlineData("[upper][foo][/upper]", "[FOO]")]
        [InlineData("[upper] [ foo ] [/upper]", " [ FOO ] ")]
        [InlineData("[[upper] [[] foo []] [/upper]]", "[upper] [[] foo []] [/upper]")]
        [InlineData("[[[upper] [[] foo []] [/upper]]]", "[[upper] [[] foo []] [/upper]]")]
        [InlineData("[upper] [hello] [/upper]", " HELLO WORLD! ")]
        [InlineData("[foo arg1=blah] ", "[foo arg1=blah] ")]
        [InlineData("[  foo arg1=blah  ]", "[  foo arg1=blah  ]")]
        [InlineData("[  foo arg1=blah  ] [/foo]", "[  foo arg1=blah  ] [/foo]")]
        [InlineData("[/foo]", "[/foo]")]
        [InlineData(" [/ foo ] ", " [/ foo ] ")]

@sebastienros
Copy link
Owner Author

Your comment made me think and I added more tests, obviously found issues which are now fixed.

@sebastienros sebastienros merged commit 8c47e1a into master Dec 12, 2020
@sebastienros sebastienros deleted the sebros/unknownshortcodes branch December 12, 2020 00:36
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.

Do we want important features dependent on shortcodes feature?
2 participants