Signal Boost: Markdown on Dreamwidth
2019-01-09 06:57 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Signal boost: jesse_the_k | Markdown Simplifies Formatting Your DW Posts.
Markdown is a popular plain-text markup language that strongly resembles
the conventions of email. In fact, posting by email has used markdown for
a long time; you can now use it for posting by using the HTML editor and
starting your post with !markdown
. It also works if you're
using a client that takes raw HTML, such as charm
or
MakeStuff
. See Jesse's post for the cheat-sheet, or go to
the official spec, at https://daringfireball.net/projects/markdown/syntax. Note that most
GitHub extensions, e.g. code fencing with triple backticks, are
not supported. At least, not yet. There is one DW-specific
extension: @username expands to a standard user link, e.g. mdlbear.
no subject
Date: 2019-01-09 04:05 pm (UTC)no subject
Date: 2019-01-10 12:45 pm (UTC)Do you happen to know of any way to convince email posts not to put unwanted line breaks in every 75 characters or so?
no subject
Date: 2019-01-10 04:11 pm (UTC)* HTML ignores line breaks altogether, and only puts them in where the markup says they belong (i.e. between paragraphs or at explicit <br> tags). But nobody puts in paragraph or line-break tags when they're typing into a web form.
* Therefore, DW's normal automatic formatting puts a <br> (line break) tag wherever it sees a line break in a post. This simplifies things a lot for people who follow what has become the standard convention of using line breaks to separate paragraphs and letting their word processor or whatever handle word wrapping ("soft" wrapping).
* Email, on the other hand, adheres to the older convention of wrapping lines with hard line breaks to keep them short, and using a blank line to separate paragraphs. Markdown and other plain-text markup languages also follow this convention. The default line width for email is 72 characters, and if you're writing your email in a command-line client it will automatically put in the hard line-breaks (newline characters) for you.
* Essentially all web-based email clients default to letting you compose your email in HTML, putting in break tags the same way DW does. But, because the standard for email is plain text with 72-character lines, your email program will helpfully create a plain-text copy of your HTML, with the tags stripped out and line breaks and blank lines inserted as usual. (You can see this in gmail, for example, by selecting "show original" on one of your sent messages -- there will be both a text/plain and text/html section.)
My assumption is that when you post by email, DW is looking at the text/plain version of your email even if you wrote it in HTML. My guess is that you can fix the problem by turning off DW's auto-formatting. I'm pretty sure there's an account-wide setting for this, but I don't know whether it applies to email posts. You might (as I said earlier, I haven't tried any of this yet) also be able to turn it off by adding the following header line to your email:
no subject
Date: 2019-01-14 02:16 am (UTC)