redmine_highlightjs icon indicating copy to clipboard operation
redmine_highlightjs copied to clipboard

no highlight xml code

Open hxdhan opened this issue 9 years ago • 2 comments

xml code can not be highlighted.

hxdhan avatar Nov 22 '15 05:11 hxdhan

Can You please provide an example, it works for me for sure.
There are some problems with mixed content and xml, but it's highlight lib mistake. Please note that some xml's can contain < pre> or < code> tags and that breaks whole redmine block.

dominch avatar Nov 23 '15 10:11 dominch

I have xml file like this, but it can not be lighted.

<?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="mapper.BrandsMapper">

    <!--enable mybatis default cache configure reference:
        https://mybatis.github.io/mybatis-3/zh/sqlmap-xml.html#cache
    -->
    <sql id="brandsColumns">
        ${alias}.brand_id,
        ${alias}.brand_desc,
        ${alias}.logo,
        ${alias}.create_date,
        ${alias}.brand_nm
    </sql>

    <select id="getAllBrands" resultType="entity.Brands">
        select
        <include refid="brandsColumns">
            <property name="alias" value="t"/>
        </include>
        from brands t where 1=1
    </select>
</mapper>

hxdhan avatar Dec 01 '15 09:12 hxdhan