Interpret <br> as native newline formatting #222

Open
jgm opened this Issue Jul 9, 2011 · 2 comments

Comments

Projects
None yet
1 participant
@jgm
Owner

jgm commented Jul 9, 2011

See issue 78 for screenshots/examples:
http://code.google.com/p/gitit/issues/detail?id=78

Newlines expressed '<br>' (as opposed to the '  $' or '$\' Markdown
conventions) vanish when going from Markdown to PDF via ConText, because
the Context generator in Pandoc discards them. '<br>' fills an
inline-newline niche ("foo<br>baz") that the other 2 conventions do not,
and so a user might want (and expect) <br> to work like the others.

That is, <br> would be treated not as raw HTML/HtmlInline but as a regular
linebreak. If pandoc is exporting to HTML, then that linebreak will get
turned right back into a <br>, and the other formats like Context will get
the linebreaks they ought to. (Offhand, I know of no situation where one
wants the <br> to go through verbatim, and which would also not see all
regular linebreaks turned into <br>s.)

(This general idea might also apply to some of the other simple HTML markup
like <i> or <b>, but probably not. Those all are inline formatting with
inline Markdown replacements.)

Google Code Info:
Issue #: 79
Author: gwe...@gmail.com
Created On: 2009-12-21T00:43:43.000Z
Closed On: 

@ghost ghost assigned jgm Jul 9, 2011

@jgm

This comment has been minimized.

Show comment Hide comment
@jgm

jgm Jul 9, 2011

Owner

One potential problem: Markdown is supposed to pass raw html through verbatim.
So,
hello
there ==> hello
there
and
hello
there ==> hello
there
We break this invariant if we parse
as linebreak, then print it in HTML as
.

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2009-12-21T02:32:02.000Z

Owner

jgm commented Jul 9, 2011

One potential problem: Markdown is supposed to pass raw html through verbatim.
So,
hello
there ==> hello
there
and
hello
there ==> hello
there
We break this invariant if we parse
as linebreak, then print it in HTML as
.

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2009-12-21T02:32:02.000Z

@jgm

This comment has been minimized.

Show comment Hide comment
@jgm

jgm Jul 9, 2011

Owner

But
and
mean the same thing in both source document and output HTML, don't
they?

Reading through http://daringfireball.net/projects/markdown/syntax#html I get a vibe
that it isn't asking for an invariant that's verbatim down to the bit level, but that
the passed-through HTML does what it would do if one had written in raw HTML to begin
with; swapping
for
would respect that.

Google Code Info:
Author: gwe...@gmail.com
Created On: 2009-12-21T18:02:01.000Z

Owner

jgm commented Jul 9, 2011

But
and
mean the same thing in both source document and output HTML, don't
they?

Reading through http://daringfireball.net/projects/markdown/syntax#html I get a vibe
that it isn't asking for an invariant that's verbatim down to the bit level, but that
the passed-through HTML does what it would do if one had written in raw HTML to begin
with; swapping
for
would respect that.

Google Code Info:
Author: gwe...@gmail.com
Created On: 2009-12-21T18:02:01.000Z

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