-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Refactored the doctrine_pretty_query filter to support "highlight only" mode #477
Conversation
cdb6b5a
to
8da6f54
Compare
@javiereguiluz please clean your branch from all these merge commits. It looks like your local master branch diverged form the upstream one. |
ok, diff got lost now |
1eaee71
to
953ec23
Compare
The PR is now ready to be reviewed. Thanks. |
} else { | ||
$html = \SqlFormatter::format($sql); | ||
} | ||
|
||
$html = preg_replace('/<pre class="(.*)">([^"]*+)<\/pre>/Us', '<div class="\1"><pre>\2</pre></div>', $html); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be simplified, by changing SqlFormatter::$use_pre
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and when highlighting only, should we really return a <pre>
tag ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't use $use_pre
because is a "global state" and we need to output different things depending whther we highlight or not. I've just updated the code.
Refactored the doctrine_pretty_query filter to support "highlight only" mode
This fixes #469