Skip to content

Inline code blocks not rendering properly when contents begin with a ~ #13

Description

@TinaRussell

Not sure if this is the right place to report this 😅 but in my project, Hermeneus, there’s a rendering problem I’ve been having with GitHub’s rendering of the README.org file. At one point it says:

Then, put the following in your ~~​/​.emacs~ or ~~​/.emacs.d/init.el~ file (whichever is present):

Now, I used zero-width spaces (as recommended by the Org documentation) to make it unambiguous which tildes and slashes are code/emphasis markers and which aren’t. It looks like this if you replace the zero-width spaces with “[ZWS]”:

Then, put the following in your ~~[ZWS]/[ZWS].emacs~ or ~~[ZWS]/.emacs.d/init.el~ file (whichever is present):

That’s enough to get Emacs to render it properly, both in the interface itself (with both org-fontify-emphasized-text and org-hide-emphasis-markers turned on) and in a LaTeX PDF export. But in GitHub, it renders literally, with all tildes left in and nothing rendered as code. That is, I expect something like this: “~/.emacs or ~/.emacs.d/init.el” and instead get this: “~~/.emacs~ or ~~/.emacs.d.init.el~”

Anyway, code renders correctly elsewhere in the document, so I’m guessing the fact that the contents of these inline code blocks begin with tildes is what is tripping up the renderer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions