About quoting the code

How to quote xml code in a citation

[!tip] Совет
Опытные пользователи Spring могут быть знакомы с эквивалентом XML-объявления из пространства имен context: в Spring, показанным в следующем примере:

<beans>
	<context:component-scan base-package="com.acme"/>
</beans>```

Why is it so crooked?

What is the right way to do this?

Does this work as you want?

> [!tip] Совет  
> Опытные пользователи Spring могут быть знакомы с эквивалентом XML-объявления из пространства имен `context:` в Spring, показанным в следующем примере:
> 
> ```xml
> <beans>
> 	<context:component-scan base-package="com.acme"/>
> </beans>
> ```

  1. please remove the backtiks after </beans>```
  2. put backtiks ``` always in a new line

It doesn’t work

It doesn’t work anyway

maybe it’s because of the dataview add-on?

Html Tags need \ to work correctly in markdown, but fenced XML code don’t need this workaround.

Edit
Well, I couldn’t reproduce your issue.
With the default theme, everything looks correct

Try another theme or deactivate your plugins.

1 Like

Looks like maybe this report:

1 Like

Hello.

Your syntax in the screenshot looks as follows:

> [!tip] Совет  
Опытные пользователи Spring могут быть знакомы с эквивалентом XML-объявления из пространства имен `context:` в Spring, показанным в следующем примере:
```xml
<beans>
> 	<context:component-scan base-package="com.acme"/>
> </beans>
>```

The syntax I used is as follows:

> [!tip] Совет  
> Опытные пользователи Spring могут быть знакомы с эквивалентом XML-объявления из пространства имен `context:` в Spring, показанным в следующем примере:
> ```xml
> <beans>
> 	<context:component-scan base-package="com.acme"/>
> </beans>
>```

In my local test vault, my syntax works, whereas your syntax produces an error.