Skip to content

Commit

Permalink
EZP-30628: Soft return inside inline style is removed after edit (#48)
Browse files Browse the repository at this point in the history
* EZP-30628: Soft return inside inline style is removed after edit

* changed eztemplateinline/ezcontent matcher more specific and check if literallayout is parent
  • Loading branch information
konradoboza authored and lserwatka committed Jul 11, 2019
1 parent 8a66616 commit c1d2715
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Expand Up @@ -729,6 +729,12 @@
<xsl:apply-templates select="node()|@*"/>
</xsl:template>

<xsl:template match="docbook:literallayout/docbook:eztemplateinline/docbook:ezcontent/text()">
<xsl:call-template name="breakLine">
<xsl:with-param name="text" select="."/>
</xsl:call-template>
</xsl:template>

<xsl:template name="extractStyleValue">
<xsl:param name="style"/>
<xsl:param name="property"/>
Expand Down
Expand Up @@ -4,5 +4,8 @@
xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml"
xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom"
version="5.0-variant ezpublish-1.0">
<para>Some <eztemplateinline type="style" name="highlighted_word"><ezcontent>highlighted words</ezcontent></eztemplateinline> for the otherwise unremarkable paragraph.</para>
<para>
<literallayout class="normal">Some <eztemplateinline type="style" name="highlighted_word"><ezcontent>highlighted words
with line break</ezcontent></eztemplateinline> for the otherwise unremarkable paragraph.</literallayout>
</para>
</section>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://ez.no/namespaces/ezpublish5/xhtml5/edit">
<p>Some <span data-ezelement="eztemplateinline" data-eztype="style" data-ezname="highlighted_word">highlighted words</span> for the otherwise unremarkable paragraph.</p>
<p>Some <span data-ezelement="eztemplateinline" data-eztype="style" data-ezname="highlighted_word">highlighted words<br/>with line break</span> for the otherwise unremarkable paragraph.</p>
</section>

0 comments on commit c1d2715

Please sign in to comment.