|
5 | 5 | <#assign elementType="${current.class.simpleName}"/> |
6 | 6 | <#if elementType = 'DocPhrase'> |
7 | 7 | <#if (current.link)??> |
8 | | - <a style="<@handleStyle styleValue=current.style/>" href="${current.link}">${current.text}</a> |
| 8 | + <a <@handleStyleOnly styleValue=current.style/> href="${current.link}">${current.text}</a> |
9 | 9 | <#elseif (current.anchor)??> |
10 | | - <a style="<@handleStyle styleValue=current.style/>" name="${current.anchor}">${current.text}</a> |
| 10 | + <a <@handleStyleOnly styleValue=current.style/> name="${current.anchor}">${current.text}</a> |
11 | 11 | <#else> |
12 | | - <span style="<@handleStyle styleValue=current.style/>">${current.text}</span> |
| 12 | + <span <@handleStyleOnly styleValue=current.style/>>${current.text}</span> |
13 | 13 | </#if> |
14 | 14 | <#elseif elementType = 'DocNbsp'> |
15 | 15 | |
16 | 16 | <#elseif elementType = 'DocBr'> |
17 | 17 | <br/> |
18 | 18 | <#elseif elementType = 'DocPara'> |
19 | 19 | <#if current.headLevel == 0> |
20 | | - <p style="<@handleAlign alignValue=current.align/> <@handleStyle styleValue=current.style/>">${current.text}</p> |
| 20 | + <p <@handleStyleComplete styleValue=current.style alignValue=current.align/>>${current.text}</p> |
21 | 21 | <#else> |
22 | | - <h${current.headLevel} style="<@handleAlign alignValue=current.align/> <@handleStyle styleValue=current.style/>">${current.text}</h${current.headLevel}> |
| 22 | + <h${current.headLevel} <@handleStyleComplete styleValue=current.style alignValue=current.align/>>${current.text}</h${current.headLevel}> |
23 | 23 | </#if> |
24 | 24 | <#elseif elementType = 'DocTable'> |
25 | 25 | <@handleTable docTable=current/> |
|
63 | 63 |
|
64 | 64 | <#macro handleAlign alignValue><#if alignValue = 1>text-align: left;<#elseif alignValue = 2>text-align: center;<#elseif alignValue = 3>text-align: right;</#if></#macro> |
65 | 65 |
|
66 | | -<#macro handleStyle styleValue><#if styleValue = 2>font-weight: bold;<#elseif styleValue = 3>font-weight: underline;<#elseif styleValue = 4>font-style: italic;<#elseif styleValue = 5>font-weight: bold; font-style: italic;</#if> </#macro> |
| 66 | +<#macro handleStyle styleValue><#if styleValue = 2>font-weight: bold;<#elseif styleValue = 3>font-weight: underline;<#elseif styleValue = 4>font-style: italic;<#elseif styleValue = 5>font-weight: bold; font-style: italic;</#if></#macro> |
| 67 | + |
| 68 | +<#macro handleStyleOnly styleValue><#assign cStyle><@handleStyle styleValue=styleValue/></#assign><#if cStyle != '' >style="${cStyle}"</#if></#macro> |
| 69 | + |
| 70 | +<#macro handleStyleComplete styleValue alignValue><#assign cStyle><@handleStyle styleValue=styleValue/></#assign><#assign cAlign><@handleAlign alignValue=alignValue/></#assign><#if cStyle != '' || cAlign != '' >style="${cStyle} ${cAlign}"</#if></#macro> |
67 | 71 |
|
0 commit comments