I don't need language detection

Good day.

After editing some article in the Knowladge base I have completely brocken formatting with new block and comments like C/C++ code detected.  And I have to spent time to fix this detection.

Is there way to get rid of this detection in WYSIWYG mode?

Thank you,

Serge

 

13 comments
Comment actions Permalink

Hello Serge,
At the moment, it is impossible to turn the code detection off, only to switch to "plain text" when the editor is detecting some code.

Could you please clarify whether code was detected incorrectly, or you just don't want to use such detection? If some non-code text was formatted incorrectly, please send me an example of such text.

0
Comment actions Permalink

Re: or you just don't want to use such detection?

Yes, it is exactly what I want. As a programmer, I understand that it is a simple checkbox "Do not detect code" and it's handle. Couple lines of code.

Re:  please send me an example of such text.

It was a lot of time - when I used + in the text and even when I just combined tabs, normal and bold text. Right now my article is finished, sorry, I afraid to break it again :) 

When I'll meet the situation again, I'll add an example. But, for me as a user, simple checkbox it the best solution.

 

 

0
Comment actions Permalink

Hello Serge,

Thank you for your answer.

It would be helpful to have some examples to understand why the formatting was broken, because WYSIWYG shouldn't change a simple plain text to code. It could've been some code that was copied from anywhere else and the formatting was copied as well, or if the text had a ```-block or if some lines were appended by four spaces, it could've been changed to code as well.

0
Comment actions Permalink

Re: It would be helpful to have some examples to understand why the formatting was broken,

 

Ok, this is an example: https://sky-mechanics.myjetbrains.com/youtrack/articles/NOY-A-22/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5-%D0%B8-%D1%80%D0%B5%D0%B4%D0%B0%D0%BA%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82%D0%BE%D0%B2

I hope you have rights to see the article. There is only one block detected as C++ block.  And it is NOT С++ block, of couse.

I do not use the code blocks in my atricles at all. Please, give me possibility to tell this to your product. I spend too much time to solve these problems.

 

 

 

0
Comment actions Permalink

Thank you for the update.

Unfortunately, I cannot see the article. Would it be possible to allow access to the guest account? If not, I suggest creating a request to our support and investigating the issue in the scope of the ticket.

0
Comment actions Permalink

Alisa, I thought you are a support member :)

 

0
Comment actions Permalink

Serge,

Well, I am a support team member :) I suggested proceeding with the investigation in the ticket because it could help to maintain privacy: if you don't want to allow everybody to view your article, then you can create a support account and share its credentials with us via the ticket.

Or I can log into your instance using the technical account (with administrator permissions) if it's ok for you.

0
Comment actions Permalink

Re: Well, I am a support team member 

So, please, help me then. You have enough information - my opinion and  link to the problem article.

Re: Or I can log into your instance using the technical account (with administrator permissions) if it's ok for you.

Yes, it is OK for me. I won't fix the problem during your investigation. Tell me please when you finished.

0
Comment actions Permalink

Alisa, any news? 

Really, I can repeat this situation now. If a line has tabs or spaces for indent and some digits like 3.1 (for sub-article) , your system think it is C++ code.  Very bad behaviour. 

 

0
Comment actions Permalink

Hello Serge,

I have checked your article and reproduced the same behaviour.

The root cause is the following: our article editor uses markdown (even in WYSIWYG mode), which means that if you put four spaces at the beginning of the line, the editor will detect an intended code block. Tabs behave as spaces as well, e.g., if you put two tabs at the beginning of the line, it will be interpreted as four spaces, and an intended code block will appear (please refer to the markdown specification). I suppose that happened in your article.

The issue is that such code blocks are not detected during the editing but only after the article is published. WYSIWYG implies that all changes made in the editor should persist when the article is published. I have created the corresponding bug to fix it: https://youtrack.jetbrains.com/issue/JT-62939. Please vote for it to subscribe to its notifications.

Until the bug is fixed, I suggest avoiding using spaces/tabs to align the text lines. Please accept our apologies for the inconvenience caused.

0
Comment actions Permalink

Thank you, Alisa, but.... it is not exactly what did I want . I don't need code detection AT ALL. Not during editing, not after it. Really, NOBODY needs this autodetection, try to make poll between your customers. 

Ther is a good solution in Jira - you can just select part of text and mark it as code. 

0
Comment actions Permalink

Hello Serge,

Thank you for the update.

I have discussed this behaviour with our development team and here are the results.

Code detection feature is not transforming some text into a code block, it simply detects a language inside an already existing code block and highlights its syntax correctly.

The article examples that you have provided are caused by the same bug: https://youtrack.jetbrains.com/issue/JT-62939. The point is that spaces or tabs at the beginning of text lines should not create code blocks in WYSIWYG mode. As soon as this bug is fixed, no text will be transformed into a code block due to tabs/spaces unless you select it and mark it as a code block yourself.

So the point is that the issue that you have reported is not caused by the code detection, but by the mentioned bug in the editor. That is why we do not plan to make it possible to disable the code detection itself.

I hope this information clarifies the issue.

0

Please sign in to leave a comment.