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

text/plain renders lang ... incorrectly, but renders ... ok #72

Closed
jdanbrown opened this issue Jun 11, 2013 · 3 comments
Closed

text/plain renders lang ... incorrectly, but renders ... ok #72

jdanbrown opened this issue Jun 11, 2013 · 3 comments

Comments

@jdanbrown
Copy link

MDH:

```
1
2
```

```scala
1
2
```

```python
1
2
```

text/plain part of email body:

Content-Type: text/plain; charset=UTF-8

1
2

12

12
@adam-p
Copy link
Owner

adam-p commented Jun 16, 2013

Markdown Here doesn't set the text/plain part of the email -- it's up the client to derive it from the HTML version.

One thing we could, in theory, do is massage the syntax highlighting output so that it gets converted to plaintext better. Except... then we'd have to figure out how each mail client (Gmail, Hotmail, Yahoo, Thunderbird, etc.) do their conversion. And then detect and fix when those clients change. Which is pretty unappealing.

(And if we have to change the Highlight.js code that we use, we wouldn't get approved by Mozilla. But maybe we could post-process the Highlight.js output. Anyway.)

The only platform that we can reasonably set the text/plain stream for is Thunderbird. I'm going to close this issue, but if you have opinions about how the text/plain should look there, add your input to issue #63.

@adam-p adam-p closed this as completed Jun 16, 2013
@jdanbrown
Copy link
Author

Oh jeez, I didn't realize you weren't emitting the text/plain directly. What a pain.

I expect this kind of issue will become more important over time, but I understand why it wouldn't be high prio for you now. Thanks Adam.

@adam-p
Copy link
Owner

adam-p commented Jun 27, 2013

I agree that its desirable (and would be cool) to set the test/plain to the raw MD. Once upon a time I even tried de-prettifying and reading the Gmail JavaScript to see if I could hook in or monkeypatch it somehow. But... failed.

If you -- or anyone -- knows how to do something like that I'd certainly like to hear about it. It would probably be a pain to maintain, but maybe we could fail gracefully (i.e., into the state we're in now). Issue #50 also requires some Gmail source hackery.

jfx2006 added a commit to jfx2006/markdown-here that referenced this issue Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants