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

error in <blockquote> parsing in Markdown #5959

Closed
jywarren opened this issue Jun 28, 2019 · 5 comments · Fixed by #6069
Closed

error in <blockquote> parsing in Markdown #5959

jywarren opened this issue Jun 28, 2019 · 5 comments · Fixed by #6069
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed claimed fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet help wanted requires help by anyone willing to contribute Ruby

Comments

@jywarren
Copy link
Member

Oddly it looks like markdown blockquotes are getting converted to <p> paragraph tags:

image

this rendered from the Markdown usage:

> Text here

We may need to look at whether our markdown parser has changed. Oddly the render method in comment.rb hasn't for 4 months, so it seems unlikely to be the issue:

def render_body
body = RDiscount.new(
title_suggestion(self),
:autolink
).to_html
# if it has quoted email text that wasn't caught by the yahoo and gmail filters,
# manually insert the comment filter delimeter:
parsed = parse_quoted_text
if !trimmed_content? && parsed.present?
body = parsed[:body] + COMMENT_FILTER + parsed[:boundary] + parsed[:quote]
end
body
end

This needs some further investigation and we might also link to #3889 !

cc @ebarry

@jywarren jywarren added bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute Ruby labels Jun 28, 2019
@jywarren jywarren changed the title Blockquote parsing in Markdown error in <blockquote> parsing in Markdown Jun 28, 2019
@jywarren
Copy link
Member Author

Ah, wait! The blockquote code is there, so this is a styling issue!

image

Great. So let's check our CSS.

@jywarren
Copy link
Member Author

So it'll be in one of these; probably the first! We can check if they've changed, OR we can check if the container for comments has changed and is no longer getting these styles applied:

.blockquotestyle > blockquote {
font-size: 14px;
font-family: "Helvetica Neue";
border-left: 5px solid #736f6f;
background-color: #f3f1ef;
}

.pl-content blockquote p {
padding: 8px 4px;
margin-top: 8px;
}

@jywarren
Copy link
Member Author

This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!


@jywarren jywarren added the fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet label Jun 28, 2019
@enviro3
Copy link
Contributor

enviro3 commented Jul 19, 2019

Hi @jywarren, I'm a newbie and would love to take a shot at this issue. May I work on this?

@rexagod
Copy link
Member

rexagod commented Jul 19, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed claimed fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet help wanted requires help by anyone willing to contribute Ruby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants