Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't hardocde 'div when parsing html #8

Closed
titaniumbones opened this issue Sep 3, 2019 · 3 comments
Closed

don't hardocde 'div when parsing html #8

titaniumbones opened this issue Sep 3, 2019 · 3 comments

Comments

@titaniumbones
Copy link
Contributor

if org-html-html5-fancy is non-nil, there will be no div elements in an exported html buffer.

Probably simple to just let-bind a variable in org-msg-build depending on the value:

@titaniumbones
Copy link
Contributor Author

replying to #7 (comment) :

with a message buffer like this:

From: Matt Price <matt.price@utoronto.ca>
To: Matthew Price <matt.price@utoronto.ca>
Subject: Re: test
In-reply-to: <87pnkh57ga.fsf@utoronto.ca>
--text follows this line--
#+OPTIONS: html-postamble:nil H:5 num:nil ^:{} toc:nil d:nil
#+STARTUP: hidestars indent inlineimages
:PROPERTIES:
:reply-to: ("/tmp/87pnkh57ga.fsf@utoronto.ca")
:attachment: nil
:END:

Hi [[mailto:matt.price@utoronto.ca][Matthew]],

testreply

--citation follows this line (read-only)--
Matthew Price <matt.price@utoronto.ca> writes:

Test only. 


-- 

and org-html-html5-fancy set to t, org-msg-build will parse both the original and the reply, but will fail to insert the original at the bottom of hte reply. That's because, when it searches the paarsed tree for a div element, it find ony article. The output will look like this:

<html lang="en"><head><!-- 2019-09-03 Tue 18:41 --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="generator" content="Org mode"/><meta name="author" content="Matt Price"/></head><body><nil/>
<article id="content"><p style="text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
Test only. </p>
</article>/body></html>

I think that #10 fixes the issue.

@jeremy-compostella
Copy link
Owner

Yeah #10 should fix this issue. I have merge this patch that I had to fix though.

@jeremy-compostella
Copy link
Owner

Hi Matt,

Could you give a try to the experimental branch that I just created and provide me your feedback ?

Jeremy
One Emacs to rule them all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants