duckduckgo / zeroclickinfo-fathead

DuckDuckGo Instant Answers based on keyword data files
https://duckduckhack.com/
Other
318 stars 365 forks source link

SASS: Remove extra newline above 'parameters' #493

Closed hchienjo closed 7 years ago

hchienjo commented 7 years ago

There is an extra newline above 'parameters' subheading as can be seen for example, from here https://duckduckgo.com/?q=sass+opacify&t=lm&ia=about&iax=1

This needs to be removed.


IA Page: http://duck.co/ia/view/sass Maintainer: @VeerpalBrar

amarlearning commented 7 years ago

@hchienjo I want to do this! :grin:

hchienjo commented 7 years ago

Just go ahead. Thanks @amarlearning for volunteering.

amarlearning commented 7 years ago

@hchienjo I think the template has a bug! This fathead script works fine! See this : screenshot from 2016-11-04 18-46-06 There is an extra <br> that is inserted before Parameters, because of which we can see an extra line!

It would be great if you tell me where can I find that template so that I can fix it!

hchienjo commented 7 years ago

Unfortunately we can't edit the template, we'd need to make the parsing script remove the <br> or the extra line that is produced when the html parser encounters it.

You can refer to the documentation and also join the forum for more instructions and guidance.

You'd need to work on one of these two files: https://github.com/duckduckgo/zeroclickinfo-fathead/blob/master/lib/fathead/sass/parse_functions.py or https://github.com/duckduckgo/zeroclickinfo-fathead/blob/master/lib/fathead/sass/parse_reference.py, test it on codio and then submit a PR.

amarlearning commented 7 years ago

@hchienjo I'll find a way to do this! Just one more thing, why i am not able to add or remove any labels ?

VeerpalBrar commented 7 years ago

@amarlearning Thanks for taking this up! I would suggest starting with https://github.com/duckduckgo/zeroclickinfo-fathead/blob/master/lib/fathead/sass/parse_functions.py file as it is the one responsible for parsing information about Sass functions and thus creates the parameter and example headings.

amarlearning commented 7 years ago

@VeerpalBrar This is strange at first when i looked at the code, I found a <br> tag due to which a line break was present! But when i looked into the code today, there wasn't any <br> tag present! [screenshot]

screenshot from 2016-11-10 22-03-21

I think if somehow we can change the css properties of class .prog__container, we can resolve this issue screenshot from 2016-11-10 22-07-38

@VeerpalBrar As you are the maintainer, let me know what you think ?

moollaza commented 7 years ago

@hchienjo @amarlearning This is now fixed, we update the Fathead Database yesterday so that the code blocks have the newlines 👍

moollaza commented 7 years ago

Whoops, I thought this was the other issue (#492) . The <br> may have been from an older version of the output.txt -- The display looks correct to me now 👍