-
Notifications
You must be signed in to change notification settings - Fork 44
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
Send only plain text if the org-mode export filter did not make any changes #316
Comments
Sure, makes sense. If the result is identical, it will be easy. But if it has "no practical effect," I guess Someone(TM) will have to write a heuristic. :) |
I think my expected heuristic was "remove any
There are some optional newlines to deal with there, but it should be simple enough. |
I'm guessing that, 99.something% of the time, it would work fine. But then there would be edge cases, e.g. involving blocks... So if we do this, we should probably provide an option so it can be disabled in case any problems are found. And maybe leave it off by default for a release for a little extra live testing. |
I've just opened the issues page to see if I could find something regarding this problem, and I'm glad this issue already exists. I leave the org-mode filter always on, and when I open Element and see my own messages there's always this extra newline that bothers me. I understand this may be somewhat adjacent to the issue at hand, but IIUC not having the output always formatted as HTML is a great first step. If needed, I can volunteer for testing any patches. |
FWIW I don't see anything like that, but maybe we have different styling in Element.
Another thing that's occurred to me is that HTML rendering will collapse newlines whereas plain text rendering will not. The org filter doesn't remove those newlines from the message, but they'll be rendered as spaces if HTML is used. Some users might not like that behaviour varying depending on whether or not there was anything "not plain" about the message, so we'd want that user option on that basis alone, and we'll want to call out that particular effect in the relevant docstrings. |
I don't have any particular styling option configured in Element; I just use the default. I've just checked now and apparently this is not happening anymore. Or at least it doesn't happen all the time... I don't know yet. I'll keep an eye and report back if I find something. |
We can send smaller message events in many cases by detecting when the org-mode filter had no practical effect on the message and sending that message as only plain text.
The text was updated successfully, but these errors were encountered: