kewek
April 19, 2020, 8:31pm
1
When I use a Markdown linebreak (two spaces at end of line), I can’t manage to create a new <p>
tag, instead getting <br>
s after each line in a single <p>
tag.
Hello.--
Can I be indented?
returns
<p>Hello.<br>Can I be indented?</p>
I’m trying to just indent every Markdown line, so if any other methods can be used, that’d be nice to know as well. (AFAIK I can’t indent after a <br>
)
Any help is appreciated!
maiki
April 19, 2020, 9:24pm
2
I always have a cognitive dissonance when talking about this.
A linebreak is not a new paragraph. Like, as a concept. Something to consider.
What does “indent” mean in this context? Also, if that isn’t what you want to return, please show the HTML you do expect returned.
kewek
April 19, 2020, 11:24pm
3
Ah ye, concept-wise I guess I wasn’t clear.
From
Hello!--
I'd like to be another p tag.
(The -
s are supposed to be end spaces) I’d like:
<p>Hello!</p>
<p>I'd like to be another p tag</p>
But I get:
<p>Hello!<br>
I'd like to be another p tag</p>
By indent, I meant that I planned to apply a text-indent
CSS style, and indent each <p>
tag.
maiki
April 20, 2020, 2:30am
4
Markdown isn’t really a standard, but in my experience double spaces add line breaks, via the br element.
Normally to seperate paragraphs one uses a full newline. Which markdown parser are you coming from?
kewek
April 20, 2020, 2:59pm
5
Ah, I guess I’d missed that when I learned Markdown. It does generate <p>
s now when I insert full newlines.
Thanks for your help!
system
Closed
April 22, 2020, 2:59pm
6
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.