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

Wrap example output in CDATA #2736

Merged
merged 1 commit into from
Sep 2, 2023
Merged

Conversation

timacdonald
Copy link
Contributor

https://www.php.net/manual/en/tutorial.useful.php

The output of the first example includes an initial new line.

Screen Shot 2023-09-02 at 5 06 48 pm

The script to generate this output will not generate a newline. Here is the output of the given script:

Screen Shot 2023-09-02 at 4 59 55 pm

Wrapping in CDATA, which seems to be the pattern used for screen tags, fixes this.

Screen Shot 2023-09-02 at 5 00 17 pm

Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Without the CDATA the output is not wrapped in a <pre>. I wonder if this is a bug in PHD? In any case this change also makes sense for consistency. I'd like to have another pair of eyes on this, though.

@TimWolla TimWolla changed the title Trim example output Wrap example output in CDATA Sep 2, 2023
@Girgias Girgias merged commit 1defcda into php:master Sep 2, 2023
2 checks passed
@Girgias
Copy link
Member

Girgias commented Sep 2, 2023

Thank you!

@timacdonald timacdonald deleted the output-spacing branch September 2, 2023 22:50
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.

3 participants