Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix ApiMarkdown::renderLink() #287

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

Closed
WinterSilence wants to merge 5 commits into yiisoft:master from WinterSilence:patch-1

Conversation

@WinterSilence
Copy link
Contributor

@WinterSilence WinterSilence commented Jun 12, 2022

Normalizes .md URLs

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues #286

rob006 reacted with confused emoji
@bizley bizley requested a review from arogachev June 13, 2022 07:34
@samdark samdark added this to the 3.0.6 milestone Jun 17, 2022
Copy link
Contributor Author

@rob006 what's wrong?

Copy link
Contributor

rob006 commented Jun 19, 2022

@WinterSilence You didn't explained your change and I'm not sure how these changes could help with #286. Right now renderLink() implementation just don't make any sense - you have a lot of dead code, because both preg_replace_callback() calls do exactly the same.

#286 is weird, because there are 2 nearly identical links, but only one of them works. Did you figure out what is so special about second link that it is incorrectly rendered?

Copy link
Contributor Author

WinterSilence commented Jun 19, 2022
edited
Loading

@rob006

Did you figure out what is so special about second link that it is incorrectly rendered?

link don't have guide: prefix: [Filtering Data](output-data-widgets.md#filtering-data) and [Separate Filter Form](output-data-widgets.md#separate-filter-form)

Prefix is bad idea, because prefixed links not works in github wiki.

do exactly the same

i don't want create method with duplicated code

Copy link
Contributor

rob006 commented Jun 20, 2022

link don't have guide: prefix: [Filtering Data](output-data-widgets.md#filtering-data) and [Separate Filter Form](output-data-widgets.md#separate-filter-form)

First link does not have guide prefix and it works, so that's not it.

Copy link
Contributor Author

@rob006 what link are you talking about?

Copy link
Contributor

rob006 commented Jun 20, 2022

"Filtering Data" is ok, only "Separate Filter Form" is broken.

Copy link
Contributor Author

WinterSilence commented Jun 21, 2022
edited
Loading

@rob006 aaa... you about this: greedy condition in RegExp

Copy link
Contributor

arogachev commented Sep 13, 2022
edited
Loading

Thanks for contributing and sorry for the late review again.

I checked these changes locally and unfortunately they do nothing. Both before and after them the last mentioned problematic link is rendered like this:

<a href="guide-output-data-widgets.html#separate-filter-form">Separate Filter Form</a>

So I guess either the rendered version shown at production site is outdated or there is some additional post processing done at site level.

The bottom line is it can't be merged in the current state.

Copy link
Contributor Author

WinterSilence commented Sep 13, 2022
edited
Loading

@arogachev how you test it? ApiMarkdown::process('[Filtering Data](output-data-widgets.md#filtering-data) and [Separate Filter Form](output-data-widgets.md#separate-filter-form) returns correct result

there is some additional post processing done at site level

"site" don't don't post-fix results

Copy link
Contributor

arogachev commented Sep 13, 2022
edited
Loading

  1. Using guide console command on the whole en guide (before and after the changes).
  2. Might be something here, need to check more thoroughly.

Copy link
Contributor Author

WinterSilence commented Sep 13, 2022
edited
Loading

@arogachev 1. this PR changed only yii\apidoc\helpers\ApiMarkdown, incorrect test it by guide command. This PR not full fix for #286.
2. as I'm already told you, this is bug in apidoc

Copy link
Contributor

rob006 commented Sep 13, 2022

@WinterSilence Can you provide failing unit tests and then show how your change fixes it?

Copy link
Contributor Author

rob006 reacted with confused emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@arogachev arogachev Awaiting requested review from arogachev

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

3.0.6

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /