Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git
src/main/java/com/keenwrite/dom/DocumentConverter.java
document
.outputSettings()
- .syntax( Syntax.html )
+ .syntax( Syntax.xml )
.prettyPrint( false );
-
- document.prependChild( DOCTYPE );
return document;
src/main/java/com/keenwrite/processors/html/HtmlProcessor.java
* Constructs an HTML processor capable of curling straight quotes.
*
- * @param successor The next processor in the chain to use for text
- * processing.
+ * @param successor The next chained processor for text processing.
*/
public HtmlProcessor(
src/main/java/com/keenwrite/processors/markdown/BaseMarkdownProcessor.java
import java.util.List;
-import static com.keenwrite.util.Strings.sanitize;
-
/**
* Responsible for parsing and rendering Markdown into HTML. This is required
* to break a circular dependency between the {@link MarkdownProcessor} and
* {@link RInlineExtension}.
*/
public class BaseMarkdownProcessor extends ExecutorProcessor<String> {
private final IParse mParser;
private final IRender mRenderer;
- private final String mTitle;
public BaseMarkdownProcessor(
final Processor<String> successor, final ProcessorContext context ) {
super( successor );
- final var metadata = context.getMetadata();
final var options = new MutableDataSet();
options.set( HtmlRenderer.GENERATE_HEADER_ID, true );
.extensions( extensions )
.build();
- mTitle = metadata.get( "title" );
}
private String toXhtml( final String html ) {
final var document = DocumentConverter.parse( html );
- final var title = sanitize( mTitle );
-
- // Ensure the document title is written when generating HTML.
- if( !title.isBlank() ) {
- document.title( title );
- }
-
- return document.html();
+ return document.select( "body" ).html();
}

Removes injected title

Author DaveJarvis <email>
Date 2024-10-11 19:29:57 GMT-0700
Commit 0f0f9fcc2267ca847b23d8aa829e00896a07634f
Parent 59b784b
Delta 3 lines added, 18 lines removed, 15-line decrease