Fixed wrong paragraph styles priorities
This commit is contained in:
parent
0babf899ee
commit
a4d510caa7
10 changed files with 16 additions and 16 deletions
|
@ -572,8 +572,8 @@ public class TextParser extends Parser {
|
|||
// Apply style
|
||||
StyleInfo info = new StyleInfo();
|
||||
info.sTagName = "h" + nLevel;
|
||||
getHeadingSP().readParentStyle(nLevel, sStyleName, info);
|
||||
getHeadingSP().applyStyle(nLevel, sStyleName, info);
|
||||
getHeadingSP().readParentStyle(nLevel, sStyleName, info);
|
||||
|
||||
// add root element
|
||||
Element heading = converter.createElement(info.sTagName);
|
||||
|
|
|
@ -73,8 +73,8 @@ public abstract class StyleWithPropertiesParser extends StyleParser {
|
|||
applyDirection(style, info);
|
||||
if (style.isAutomatic()) {
|
||||
// Apply parent style + hard formatting
|
||||
readStyle(style.getParentName(), info);
|
||||
applyProperties(style, info.props, false);
|
||||
readStyle(style.getParentName(), info);
|
||||
} else {
|
||||
|
||||
String displayName = style.getDisplayName();
|
||||
|
|
|
@ -10,7 +10,7 @@ import org.apache.commons.io.FileUtils;
|
|||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class Sections {
|
||||
public class HeadingWithSections {
|
||||
@Test
|
||||
@DisplayName("Heading with sections")
|
||||
void testExample() throws Exception{
|
|
@ -10,9 +10,9 @@ import org.apache.commons.io.FileUtils;
|
|||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class PageSectionStyles {
|
||||
public class ImageAfterSection {
|
||||
@Test
|
||||
@DisplayName("Page styles and sections")
|
||||
@DisplayName("image after section")
|
||||
void testExample() throws Exception {
|
||||
String testName = "image_after_section";
|
||||
List<String> arguments = new ArrayList<String>();
|
Loading…
Add table
Add a link
Reference in a new issue