This is an automated email from the ASF dual-hosted git repository.
brushed pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
The following commit(s) were added to refs/heads/master by this push:
new 9fe2bc5 [JSPWIKI-1101] Improve rendering of {{{inline preformatted
text}}} also impacts Html-to-Wiki translator
9fe2bc5 is described below
commit 9fe2bc591dc9183f8c17deb252a2089206163cb6
Author: brushed <[email protected]>
AuthorDate: Fri Apr 5 22:16:26 2019 +0200
[JSPWIKI-1101] Improve rendering of {{{inline preformatted text}}} also
impacts Html-to-Wiki translator
---
.../wiki/htmltowiki/XHtmlElementToWikiTranslator.java | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git
a/jspwiki-main/src/main/java/org/apache/wiki/htmltowiki/XHtmlElementToWikiTranslator.java
b/jspwiki-main/src/main/java/org/apache/wiki/htmltowiki/XHtmlElementToWikiTranslator.java
index 872aa9d..1342da0 100644
---
a/jspwiki-main/src/main/java/org/apache/wiki/htmltowiki/XHtmlElementToWikiTranslator.java
+++
b/jspwiki-main/src/main/java/org/apache/wiki/htmltowiki/XHtmlElementToWikiTranslator.java
@@ -137,7 +137,7 @@ public class XHtmlElementToWikiTranslator
String cssClass = base.getAttributeValue( "class" );
// accomodate a FCKeditor bug with Firefox: when a link is
removed, it becomes <span class="wikipage">text</span>.
- boolean ignoredCssClass = cssClass != null &&
cssClass.matches( "wikipage|createpage|external|interwiki|attachment" );
+ boolean ignoredCssClass = cssClass != null &&
cssClass.matches(
"wikipage|createpage|external|interwiki|attachment|inline-code" );
Map styleProps = null;
@@ -148,18 +148,13 @@ public class XHtmlElementToWikiTranslator
styleProps = getStylePropertiesLowerCase( base );
}
- if( styleProps != null )
+ if( cssClass != null && "inline-code".equals(cssClass) )
{
- String fontFamily = (String)styleProps.get( "font-family"
);
- String whiteSpace = (String)styleProps.get( "white-space"
);
- if( fontFamily != null && ( fontFamily.indexOf(
"monospace" ) >= 0
- && whiteSpace != null && whiteSpace.indexOf( "pre"
) >= 0 ) )
- {
- styleProps.remove( "font-family" );
- styleProps.remove( "white-space" );
- monospace = true;
- }
+ monospace = true;
+ }
+ if( styleProps != null )
+ {
String weight = (String)styleProps.remove( "font-weight" );
String style = (String)styleProps.remove( "font-style" );