dominch / redmine_highlightjs

A redmine plugin to highlight code blocks much better than coderay!
Other
22 stars 10 forks source link

no highlight xml code #16

Open hxdhan opened 8 years ago

hxdhan commented 8 years ago

xml code can not be highlighted.

dominch commented 8 years ago

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.

hxdhan commented 8 years ago

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>