Skip to content

Wrap example output in CDATA - #2736

Merged
Girgias merged 1 commit into
php:masterfrom
timacdonald:output-spacing
Sep 2, 2023
Merged

Wrap example output in CDATA#2736
Girgias merged 1 commit into
php:masterfrom
timacdonald:output-spacing

Conversation

@timacdonald

Copy link
Copy Markdown
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

@TimWolla TimWolla left a comment

Copy link
Copy Markdown
Member

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 requested a review from Girgias September 2, 2023 12:01
@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
@Girgias

Girgias commented Sep 2, 2023

Copy link
Copy Markdown
Member

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