Skip to content

Make sure matching multiline decorators with dots in the content don'…#38

Closed
trbm1 wants to merge 1 commit intoesdoc:masterfrom
trbm1:master
Closed

Make sure matching multiline decorators with dots in the content don'…#38
trbm1 wants to merge 1 commit intoesdoc:masterfrom
trbm1:master

Conversation

@trbm1
Copy link

@trbm1 trbm1 commented Oct 20, 2017

…t break the matching.

@trbm1
Copy link
Author

trbm1 commented Oct 20, 2017

solving: #36

@h13i32maru
Copy link
Member

h13i32maru commented Nov 12, 2017

I can not have reproduce after I merged esdoc/esdoc#472

Can you close this PR?

@trbm1
Copy link
Author

trbm1 commented Nov 12, 2017

Thank you for merging my changes @h13i32maru
This PR solves complex arguments in decorates, where the PR in the main project was just matching multiline arguments. Let me show you:
http://rubular.com/r/6UdWsNAQS1

You can see that the second decorator fails. This PR is intended to solve those complex argument. Do you need more information to replay this? LMK.

Summary:
multiline fix (in esdoc) complex argument fix (in esdoc-plugins)

@trbm1
Copy link
Author

trbm1 commented Nov 26, 2017

Additional note: The DocBuilder.js @ line 701 (splitting operation) will fail when complex decorators are involved. No clue why, because no time to dig in. My fix for now:

//TODO: when not split by ':' prevent breaking. Assuming this has to do with decorators. No clue what this does
        if (tmp.length!=2) {
          return `${v}: null`;
        }

@h13i32maru
Copy link
Member

h13i32maru commented Apr 30, 2018

This changing breaks the behavior.
Please check 16560ff

'Foo#bar'.match(/(.*)[.#](.*)$/)
// => ["Foo#bar", "Foo", "bar", index: 0, input: "Foo#bar"]

'Foo#bar'.match(/(.*)[.#](?=.*\()(.*)$/)
// => null

@trbm1 trbm1 closed this by deleting the head repository May 18, 2023
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