main section class to container and don't print #+END
This helps to make sure that simple css things like pico or simple work better with our site. Also don't export the text #+END.
This commit is contained in:
parent
38767b0f16
commit
4e894bbbca
1 changed files with 6 additions and 2 deletions
|
|
@ -92,7 +92,7 @@ impl OrgHtmlExporter {
|
|||
impl Traverser for OrgHtmlExporter {
|
||||
fn event(&mut self, event: Event, ctx: &mut TraversalContext) {
|
||||
match event {
|
||||
Event::Enter(Container::Document(_)) => self.output += "<main>\n",
|
||||
Event::Enter(Container::Document(_)) => self.output += "<main class=\"container\">\n",
|
||||
Event::Leave(Container::Document(_)) => self.output += "</main>\n",
|
||||
|
||||
Event::Enter(Container::Headline(headline)) => {
|
||||
|
|
@ -311,6 +311,7 @@ impl Traverser for OrgHtmlExporter {
|
|||
.parent()
|
||||
.is_some_and(|parent| match parent.kind() {
|
||||
SyntaxKind::KEYWORD
|
||||
| SyntaxKind::SPECIAL_BLOCK
|
||||
| SyntaxKind::DYN_BLOCK
|
||||
| SyntaxKind::DRAWER
|
||||
| SyntaxKind::DRAWER_END
|
||||
|
|
@ -321,7 +322,10 @@ impl Traverser for OrgHtmlExporter {
|
|||
{
|
||||
()
|
||||
} else {
|
||||
let _ = write!(&mut self.output, "{}", HtmlEscape(text));
|
||||
// END section seems to get through parser
|
||||
if !text.contains("#+END") {
|
||||
let _ = write!(&mut self.output, "{}", HtmlEscape(text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue