Backslashes with placeholders


#1

I think that most of my problems with the new forum software occur because I am used to other software and getting too old to change my habits. :wink:

But there some things that are really disturbing. I often write and then see that the forum software just eats up some signs that I wrote.
So I noticed that a written backslash in a format string with placeholders just vanishes.
I found out that I can avoid that by using "Preformated Text".
D:\Music\%artist%\%track% - %title%
without using preformated text would look like
D:\Music%artist%%track% - %title%

Are there other ways of avoiding the disappearance of these backslashes?

Anyway:
I think this is a real problem for the forum because you already can see such strings without backslashes, where it looks like the backslashes should be there. The members just did not see that after saving or in preview their written backslashes disappeared.

And I noticed - which is even a bigger problem - that the backslashes in a lot of transferred threads from the former forum-software seem to be missing too.


#2

Yes, you can use double backslash to make one backslash appear:
D:\Music\%artist%\%track% - %title%
what I actually wrote here:
D:\\Music\\%artist%\\%track% - %title%

Backslash is now considered not as normal but as a control character and therefore must be "escaped".


#3

The backslash only vanishes if it is in combination with %.
"D:\Music\Rock" makes no problem.

This feature already causes a lot of confusion, because it is not intuitive for most users and I doubt that it will ever get.


And as I wrote there is a big problem with threads of the past, which were not transcribed to be correct with the new forum-software, for example:


#4

This also came as a surprise to me and I think "normal" markdown doesn't have this specific behavior. I don't think that the markdown engine used by Discourse can be adapted to make an exception for this special case. I'm still researching how to best fix the old posts to properly escape those character combinations.

I think in the long run, we'll get used to this new behavior, use code ticks to mark format strings (this looks better anyway) and hopefully spot missing backslashes in posts of new members here.


#5

It will also vanish at the end of a line because you can use it as visible marker (in the source code) for a new line instead of two spaces. It's a special character now.

line one\
line two

I think this could be solved by replacing all single backslashes with double ones, except they are in [code] tags. But such replacements are always quite risky.


#6

FYI, I've fixed the imported posts.


#7

@Florian
Thank you. That will avoid a lot of confusion with older threads.

Do you see a chance to fix the problem with quotation marks in older imported threads too?
https://community.mp3tag.de/t/feature-request/16010/2?u=poster


#8

I've just finished conversion of the quotation marks and changed the forums software, so that it doesn't convert them automagically anymore.

Thanks for the motivation!


#9

Just FYI, I've just finished another conversion where certain code blocks where not displayed as such.


#10

I noticed another problem in threads of the former forum software, which have not been undergoing a conversion:
Threads that refer to create multi-value Fields with the double-backslash"\\".
Example:


#11

I'm starting to fear your posts in this topic :fearful:

This one is actually very tricky as there are already a plentitude of posts where the single backslash has been replaced by a double backslash. It's now hard to impossible to determine which of the 3147 posts use \\ to denote multi-value fields. I'll have to think about this.


#12

Couldn't this be determined by the date:
all posts prior to the switch probably mean \\ when while the later ones used it as a workaround?!


#13

If I hadn't replaced many single backslashes to double backslashes due to the other issues raised in this thread before — yes. Now the ones that were double backslashes already before became undistinguishable from the converted ones. :crazy_face:


#14

But did you not only change those to double which were together with % or at the end of a line?


#15

Yes, and I've changed some other occurrences too.

Over the past hours, I've written a small script that detected the occurrences of the multi-value fields separator and converted it to the new format. It should display fine now.

Thanks for pointing!