koala-framework / koala-framework

Framework and CMS based on Zend Framework and ExtJS
http://www.koala-framework.org/
BSD 2-Clause "Simplified" License
61 stars 39 forks source link

Don't skip empty text-element in block-element #1201

Open Ben-Ho opened 2 months ago

Ben-Ho commented 2 months ago

somehow spaces are converted into separate text-elements and then filtered out. I introduced this but I can't remember which problem it should fix so I'm "reverting" this change to fix the current bug.

e.g. "lorem ipsum dolor sit amet" is converted to

{
    "element":"p",
    "children":[
        {
            "element":"text",
            "text":"lorem "
        },{
            "element":"strong",
            "children":[
                {"element":"text","text":"ipsum"}
            ]
        },{
            "element":"strong",
            "children":[
                {"element":"text","text":"dolor"}
            ]
        },{
            "element":"strong",
            "children":[
                {"element":"text","text":"sit"}
            ]
        },{
            "element":"text",
            "text":" amet"
        }
    ]
}

missing spaces between strong-elements