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

Preformatted inline code #318

Closed
martincizek opened this issue Apr 1, 2020 · 0 comments · Fixed by #319
Closed

Preformatted inline code #318

martincizek opened this issue Apr 1, 2020 · 0 comments · Fixed by #319

Comments

@martincizek
Copy link
Collaborator

Currently, inline code spans (i.e. <code> outside of a wrapping <pre>) are always subject to:

  1. HTML whitespace collapsing in collapse-whitespace.js,
  2. trimming in turndown.js and
  3. flanking whitespace outplacement determined by node.js.

So it shares the very same behavior with emphasis and strong emphasis elements, for which the flanking delimiter run is defined by the spec. → Points 2 and 3 are not necessary.

And ref point 1: GitLab, a major implementor of the CommontMark format nowadays, has <code> element styled as white-space: pre-wrap;, which actually makes sense.

See the snapshots below. The lacking feature is that Turndown cannot produce such Markdown now.
gitlab-inline-code-span

martincizek added a commit to orchitech/turndown that referenced this issue Apr 1, 2020
martincizek added a commit to orchitech/turndown that referenced this issue Jul 6, 2020
martincizek added a commit to orchitech/turndown that referenced this issue Jul 6, 2020
michbart pushed a commit to orchitech/turndown that referenced this issue Nov 30, 2020
michbart pushed a commit to orchitech/turndown that referenced this issue Dec 3, 2020
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.

1 participant