-
Notifications
You must be signed in to change notification settings - Fork 112
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
hanging <p> and/or </p> #492
Comments
Haha yes I'm well aware of this. It's just... pretty hard. There's a few things going on but to make things simple, basically Franklin proceeds like this:
Resolved texts (considered as "plain markdown") are passed to Julia's Markdown module where they are transformed to HTML. Resolved blocks are processed recursively until they lead to a mix of plain HTML and plain markdown which is, again, is sent to Julia's Markdown module to get plain HTML There are two main issues resulting from this process:
Anyway both these issues can be addressed up to an extent: for the first one using Pandoc's markdown to html (see #459) for the latter having a process that keeps track of opening and closing things and trying to balance everything. This is not high on my priority list because browsers are excellent at ignoring the placements of the closing I hope that makes sense! |
I should add that I'm grateful for the specific reproducing examples which I'll look into, there's probably things that can be done to mitigate those cases... if you look at them in isolation: julia> s |> fd2html
"<p>I am a proponent of open source software and transparent academic research. I am an active member of the <a href=\"https://julialang.org/\">Julia</a> community.</p>\n" julia> s = """# Research""" |> fd2html
"<h1 id=\"research\"><a href=\"#research\">Research</a></h1>" One extra note: you use |
Definitely agree that it is low priority because the browsers handle it fine. It must be related to #489 . I didn't think that it was when I posted but now I see that, for example, the Here are the relevant links in case it helps (next version of my website eventually) |
I think what we'd need is a list of short examples where if you do One could also write a function chickpeas(s)
nopen = length(collect(eachmatch(r"\<p\>", s)))
nclose = length(collect(eachmatch(r"\<\/p\>", s)))
return nopen-nclose == 0
end |
alright this should be mostly fixed by #546 @tbeason I might reach out to you separately to re-try this once I've written explicit guidelines to avoid problems but basically if you want to insert a "block" then separate it with skipped lines like
and along with internal fixes, that should get the |
I see places where
<p>
or</p>
exists without its complement. It seems not to mess up the page somehow, but it stills feels like an issue.There even seems to potentially be a pattern.
If I include just a sentence of standard Markdown, that gets prefixed by
<p>
and does not get the corresponding</p>
.Here is an example that was a sentence by itself,
which became
and another, which was just a title on a Markdown page (
# Research
),Alternatively, this
turned into this
which has the trailing
</p>
at the very end.It doesn't seem to happen within an "environment" like lists. And it doesn't always happen. But in my relatively simple page, I see it in about 10 spots.
The text was updated successfully, but these errors were encountered: