Skip to content

Commit

Permalink
new version 1.8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmanusta committed Jun 30, 2024
1 parent 7005db0 commit 59834d4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2494,8 +2494,10 @@ public Document loadDocument(TextChangeEvent textChangeEvent) {
.attribute(DOC_UUID, uuid)
.attribute(DOC_FILE_ATTR, textChangeEvent.getPathText())
.build()).build();
String text = textChangeEvent.getText();
String content = ExtensionPreprocessor.correctExtensionBlocks(text);
AsciidoctorFactory.getPlainDoctor()
.convert(textChangeEvent.getText(), options);
.convert(content, options);
Document document = (Document) DOCUMENT_MAP.get(uuid);
currentTab.getEditorPane().setLastDocument(document);
DOCUMENT_MAP.remove(uuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ private ConverterResult convert(Document document, EditorPane editorPane, TextCh
// See also https://github.com/asciidoctor/asciidoctorj-diagram/issues/25
// String converted = doc.convert();
Asciidoctor asciidoctor = Objects.equals(backend,"revealjs") ? getRevealDoctor() : getHtmlDoctor();
String content = textChangeEvent.getText();
String text = textChangeEvent.getText();
String content = ExtensionPreprocessor.correctExtensionBlocks(text);
String converted = asciidoctor.convert(content, options) ;
Document finalDocument = (Document) DOCUMENT_MAP.get(docUUID);
editorPane.setLastDocument(finalDocument);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public void convert(boolean askPath, Consumer<RenderResult>... nextStep) {
.attributes(attributes)
.build();

getHtmlDoctor().convert(asciidoc, options);
String content = ExtensionPreprocessor.correctExtensionBlocks(asciidoc);
getHtmlDoctor().convert(content, options);
String rendered = IOHelper.readFile(docbookPath);
docbookValidator.validateDocbook(rendered);
logger.debug("Docbook5 conversion ended");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public void convert(boolean askPath, Consumer<RenderResult>... nextStep) {
.attributes(attributes)
.build();

getNonHtmlDoctor().convert(asciidoc, options);
String content = ExtensionPreprocessor.correctExtensionBlocks(asciidoc);

getNonHtmlDoctor().convert(content, options);

indikatorService.stopProgressBar();
logger.debug("Epub conversion ended");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ public void convert(boolean askPath, Consumer<RenderResult>... nextStep) {
.attributes(attributes)
.build();

getHtmlDoctor().convert(asciidoc, options);
String content = ExtensionPreprocessor.correctExtensionBlocks(asciidoc);

getHtmlDoctor().convert(content, options);

controller.addRemoveRecentList(htmlBookPath);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public void convert(boolean askPath, Consumer<RenderResult>... nextStep) {
.headerFooter(pdfConfigBean.getHeader_footer())
.attributes(attributes)
.build();
getNonHtmlDoctor().convert(asciidoc, options);
String content = ExtensionPreprocessor.correctExtensionBlocks(asciidoc);
getNonHtmlDoctor().convert(content, options);
asciiDocController.addRemoveRecentList(pdfPath);
onSuccessfulConversation(nextStep, destFile);
} catch (Exception e) {
Expand Down

0 comments on commit 59834d4

Please sign in to comment.