Stop Less Than Symbol Beginning New Line in Pre-Tagged Text

  • Unknown's avatar

    Hi,

    I am using some code I found on a Help Forum so that I can wrap my text inside pre-tags. I have it nearly all as I want apart from the fact that I cannot get it to not begin a new line at every occurrence of a less-than symbol.

    I will try to past the code below but I imagine it may be affected by the editor so if you need to see the draft of the actual post I would be happy to send you a link. Or obviously if you know how to solve it generically even better!

    Many thanks in advance.

    <pre style=”white-space:pre-wrap;word-wrap:break-word;”> =IF(ROWS(G$1:G1)>$F$1,"",INDIRECT(TEXT(SMALL(IF(TRANSPOSE($A$1:$D$6)<>"",TRANSPOSE(10^(4+COLUMN($A$1:$D$6))*ROW($A$1:$D$6)+COLUMN($A$1:$D$6))),ROWS(G$1:G1)),"R0C"&REPT(0,LEN(SMALL(IF(TRANSPOSE($A$1:$D$6)<>"",TRANSPOSE(10^(4+COLUMN($A$1:$D$6))*ROW($A$1:$D$6)+COLUMN($A$1:$D$6))),ROWS(G$1:G1)))-1)),0))

    The blog I need help with is: (visible only to logged in users)

  • Hi there. I think part of your code has been stripped out. Try pasting it again between code tags (see the button above the reply box in the forum, not email).

    That said, it looks like you’re trying to use JavaScript and that isn’t allowed on WordPress.com at all. http://en.support.wordpress.com/code/ The only official help forum for WordPress.com is this one, so if you got advice from another forum chances are that it applies only to self-hosted WordPress.ORG sites which don’t have code restrictions.

    The html pre-tag works on WordPress.com. See here how to use it: http://en.support.wordpress.com/advanced-html/#preformatted-text

    If you’re trying to post source code on your site, follow the instructions here: http://en.support.wordpress.com/code/posting-source-code/

  • Unknown's avatar

    Thanks. Not sure what you mean by JavaScript?

    I found a solution in the end using simply “word-wrap:break-word” within the “pre” tags.

    Appreciate your response.

    Regards

  • Glad you figured it out :)

  • The topic ‘Stop Less Than Symbol Beginning New Line in Pre-Tagged Text’ is closed to new replies.