Indentation of <![CDATA[...]]>

Answered

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.ndelt.web.mappers.article.ArticleMapper">

<select id="countArticles" resultType="int">
  <![CDATA[
  SELECT COUNT(article_no)
  FROM tbl_article
  WHERE article_no > 0
  ]]>
</select>

<select id="listSearch" resultMap="ArticleResultMap">
  <![CDATA[
      SELECT article_no, title, content, writer, reg_date, view_cnt, reply_cnt, file_cnt
      FROM tbl_article
      WHERE article_no > 0
  ]]>
</select>

</mapper>

 

If I try 'Reformat Code' for <![CDATA[...]]> blocks, some blocks are indented but other blocks are not.

Are there any conditions about indentation for <![CDATA[...]]> blocks? I can't found it in Code Style option.

0
1 comment

Hello,

I reported issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-209219

Please follow it for updates.

0

Please sign in to leave a comment.