WordPress.org

Making WordPress.org

Opened 4 years ago

Last modified 3 months ago

#333 reopened defect

Trac: Source View Line Wrapping

Reported by: netweb Owned by:
Milestone: Priority: normal
Component: Trac Keywords: has-patch
Cc:

Description

When viewing a repo's source line wrapping ain't quite right.

eg. https://bbpress.trac.wordpress.org/browser/trunk/templates/default/bbpress/form-topic-merge.php#L40

The full line of code per the above is:

40 <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>

It is displayed across three lines as:

   <?
php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post
>

If you remove overflow: hidden (bbpress.trac.wordpress.org/chrome/common/css/code.css#Line 69) you can see the remaining code 'off screen'

Attachments (2)

333.png (22.3 KB) - added by netweb 4 years ago.
333.diff (512 bytes) - added by xkon 5 months ago.
Span wrapping

Download all attachments as: .zip

Change History (7)

@netweb
4 years ago

#1 @nacin
3 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

I can't reproduce this. Whenever I see long lines, they wrap. Please reopen with a new line demonstrating this and tag it to a revision, as that file no longer exists for trunk.

#2 @netweb
3 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Here's that same file tied to a revision, which is still not wrapping as expected ;)

https://bbpress.trac.wordpress.org/browser/branches/2.5/templates/default/bbpress/form-topic-merge.php#L40

#3 @Otto42
3 years ago

Wraps for me. What are you seeing?

https://cloudup.com/cap7h_ygeLd

Edit: Note that it clearly is cutting bits off on the right, which is probably not ideal.

Last edited 3 years ago by Otto42 (previous) (diff)

#4 @xkon
5 months ago

  • Keywords has-patch added

Although it's an old topic you can easily fix the wrapping + the overflow problem by changing the spans that are generated. ( 333.diff )

By viewing the source I think I have the correct .css file. This should do the trick it will just wrap everything as they hit the end of the table.

table.code td span {
	display: inline-block;
}

Best regards,
Konstantinos

@xkon
5 months ago

Span wrapping

#5 @birgire
3 months ago

Here are other problematic code lines, number 5311 and 5312:

https://core.trac.wordpress.org/attachment/ticket/35293/35293.4.diff

The part is inside <td class="r"><ins>...</ins></td>.

Note: See TracTickets for help on using tickets.