ualberta-smr / StackOverflowNavCues

This repository holds the code related to extracting essential sentences for navigating Stack Overflow answers
2 stars 0 forks source link

One sentence not highlighted in web app #15

Closed snadi closed 5 years ago

snadi commented 5 years ago

thread_id=30101603 and answer_id=43458007

Samer narrowed down the problem to >=

From Samer for debugging:

I am running this: - logger.debug page.css('#' + answerID)[0].inner_html.include? "/>= 9.5 and they only care about top-level elements being merged without duplicate keys, then it's as easy as using the || operator:"

I have to finish something else in the next hour, but you would need to find a way for gsub to catch > I think this can happen if the gsub function is changed to catch a regex instead of a fixed string You would need to change the line here: https://github.com/samasri/DevelopersSurvey/blob/master/app/views/survey/_thread_form.html.haml#L61 to catch a regex that evaluates to the sentence text, instead of just sentence_text variable (im not sure if that works, but thats what i found from a fast search of gsub not supporting "greater than" character)

You run it in the View

sam [2:31 PM] in the view I added a branch called "debugging" with my 3 debugging lines (we can delete it later, just wanted to show u how i put it) https://github.com/samasri/DevelopersSurvey/blob/debugging/app/views/survey/_thread_form.html.haml#L50-L66

and u can see the output of logger.debug when u run tail -f log/development.log (if in development mode) from the main project directory

snadi commented 5 years ago

Related to Issue #32 , which is for the new data for the survey