Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: code without newline doesn't wrap

by Dietz (Curate)
on Feb 12, 2005 at 16:05 UTC ( #430419=note: print w/replies, xml ) Need Help??

in reply to code without newline doesn't wrap

Hi bart!

I'm using Firefox myself, and for me, the page appears similar to your screenshots.

The examples you provided are in code tags, thus, the code wrapper comes in place when there's a newline provided.

$mainform->tab->Page4->AddRichEdit... from Re^2: Change readonly status of Win32::GUI::RichEdit is not in code tags.
So this is no issue for code wrapper and probably cannot be fixed within PM.

Back to code without newline:

I'm using a modified version of demerphq's CSS (Re: Perl-blue theme (Aristotle/Demerphq Blue)), and so, code appears for me in the following form:
This is code

For the behavior of code wrapper, I'm glad that it doesn't wrap code when there is no newline.
For instance when code tags are used for mentioning functions or such within a sentence.

But this is just a matter of taste.

2 examples which are using "use strict;" in code tags:

Following use strict; is in code tags and appears in one sentence.

Now here is a sentence with
use strict;
and it is also containing
use warnings;
just to demonstrate that this is one sentence.

The second sentence would appear in the above form if code wrapper would wrap code even when there is no newline in it.
At least if you are using a similiar CSS.

Maybe there is a need for another tag you could use instead of <code></code> like <fixed></fixed> , which could be used in sentences instead of code tags, but there is no profit when users don't use it.

Corrected link-id to demerphq's CSS
and added inline CSS style to simulate the display of my CSS settings for code tags.
Update 2:
Removed inline CSS style because it didn't show up after my update.
It seems that I'm not able to show a simulation of my CSS settings (sigh).
In fact text in code tags should show up in a table with black background.

Replies are listed 'Best First'.
Re^2: code without newline doesn't wrap
by bart (Canon) on Feb 12, 2005 at 17:28 UTC
    $mainform->tab->Page4->AddRichEdit... from Re^2: Change readonly status of Win32::GUI::RichEdit is not in code tags.

    It is. Two ways you can tell:

    1. If you look at the "download code" section, it is there. How could it be if it wasn't in code tags?
    2. If you look at the XML, you can clearly see the code tags.

    And even if it wasn't, mine is in code tags. I personally did it that way. The only difference between my first example that doesn't wrap, and the following two examples that do wrap, is the addition of an extra newline inside the code tags. So it's that newline that triggers the code wrapper.

      Ah, I see.
      I didn't know that you could tell by viewing the xml version.
      Thanks for clarification! ++

      Still, I like code wrapper the way it is now (as pseudo-demonstrated by me),
      but I could also live with it if it was changed.
      But this is just my opinion.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://430419]
usemodperl is venting, duh?
[usemodperl]: that was a typos, dumbass
[marto]: usemodperl I guess that depends on what you mean by a safe space, since many people seem to have the impression a safe space allows them to do/say whatever they feel like, without question or critque
[marto]: 'typos'->'typo'
[usemodperl]: it's like you guys are retarded or something, no sense of humor? autism?
[usemodperl]: take things too literally, nothing is funny, everyhting must be perfect, or else, SCOLD SCOLD SCOLD, haha
[Veltro]: usemodperl I think you are offensive right now.
[marto]: people are very defnsive about their bad ideas behaviour' :P
[usemodperl]: sorry veltro, venting...
[usemodperl]: (is that wrong marto?)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2018-06-24 15:51 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.