Forums

Source code indention [SERIOUS hacking!] (4 posts)

  1. RSL
    Member
    Posted 8 years ago #

    I've done a few quick passes over the forum to see if anyone else has attempted anything remotely like what I'm trying to do. Alas, no. So here's the dillio:

    I'm really weird about my source code and have been hacking various functions to get their output more to my [albeit particular] liking. However, I've run across a couple of instances where I can't figure out why/how something is happening.

    1. wpautop() seems to not want to separate the closing tag sequence for p blockquote [which I can't represent here due to formatting issues]but has no problem breaking up the opening tag sequence [blockquote p]. This looks really odd to me in the source code.
    2. The order of preg_replace() calls in wpautop() seems to prevent the indention of a line that's already been broken once. This only shows up at the end of the post/excerpt. I'm no regex expert, so this is probably the hardest problem I'm facing.

    Anyone else got a clue? Thanks in advance!

  2. RSL
    Member
    Posted 8 years ago #

    Okay. Here's some irony. The second problem, about breaking the line and not indenting was the easiest to solve. So don't worry about that one. But the blockquote/p dilemma is still in effect.

  3. RSL
    Member
    Posted 8 years ago #

    Nevermind, kittens. I figured everything out. *rolls eyes*

  4. RSL
    Member
    Posted 8 years ago #

    At the risk of annoying everyone...

    Why does

    $pee = str_replace('</blockquote></p>', "</p></blockquote>", $pee);

    hit the correctly nested

    </p></blockquote>

    as well?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.