Parser problems

More
7 years 1 month ago #80989 by AlDemion
Parser problems was created by AlDemion
Hi all.
I have e problems with LimeSurvey parser.
I need to create tests with source code examples in questions, and parser try to parse this source code, so i see corrupted question.

Can i disable parser for some parts of question like <noparse> {i don't want to parse this text} <<and<< <<this>> "Text" (Too) </noparse>

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
7 years 1 month ago #80990 by DenisChenu
Replied by DenisChenu on topic Parser problems
Hello,

You can disable HTML editor.

To use < and > , use & lt; and & gt; : it's not limesurvey, it's HTML.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago - 7 years 1 month ago #80992 by AlDemion
Replied by AlDemion on topic Parser problems
I know it.
But now i'm talking about question display.
Its question code
<pre class="cpp" style="font-family:monospace;">
class Base
{
public:
virtual void foo(int n = 5) { cout&lt;&lt;&quot;Base::foo(&quot;&lt;&lt;n&lt;&lt;&quot;)&quot;&lt;&lt;endl;}
};

class Derived
{
public:
void foo(int n = 10) { cout&lt;&lt;&quot;Derived::foo() &quot;&lt;&lt;n&lt;&lt;&quot;)&quot;&lt;&lt;endl;}
};

int main()
{
Base *b = new Derived;
b-&gt;foo();
}
</pre>
Which one of the following messages is displayed when you run the sample code above?

And result you may see on the screenshot.
Attachments:
Last edit: 7 years 1 month ago by AlDemion.

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago - 7 years 1 month ago #80993 by DenisChenu
Replied by DenisChenu on topic Parser problems
For complex code, i use < textarea >

It work like a chram, an you can give a look with css too.

Denis
PS: LS parse only {SOMETHING} but you can do like this { SOMETHING }

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 7 years 1 month ago by DenisChenu.

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #81003 by TMSWhite
Replied by TMSWhite on topic Parser problems
To clarify, if you use curly braces and want LS NOT to parse the contents, you must add a space after the opening curly brace and a space before the closing curly brace.

So, instead of this:
{i don't want to parse this text}
use this:
{ i don't want to parse this text }

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!