episphere / quest

experimenting with the idea of a questionnaire markup
https://episphere.github.io/quest/
2 stars 11 forks source link

Rendering problem when displayif on same line as question id #331

Closed stealthv closed 3 years ago

stealthv commented 3 years ago

We ran into some questions that used to render correctly but now fail. The problem seems to be when the line that contains the question id also contains a displayif and the question has a field specified.

Here is an example:

[START]
Example of rending issue. The first question renders fine. The second one doesn't. The only difference is the displayif not being on the same line as the question id.

Click Next

[Q1]
This is the |displayif=equals(1,1)|first| question.
|__|__|

[Q2]This is the |displayif=equals(1,1)|second| question
|__|__|

[END]
All Done

The first question renders as expected but the second question doesn't. It looks like this:

Screen Shot 2021-05-04 at 2 12 18 PM
danielruss commented 3 years ago

@kundan22197 I thiink this is caused by confusion in the [Q2] question id. Notice there is no space between [Q2] and this. @stealthv can you add a space and see if the problem goes away.

stealthv commented 3 years ago

@danielruss No, adding a space does not fix it.

kundan22197 commented 3 years ago

Fixed