Skip to content

Latest commit

 

History

History
27 lines (25 loc) · 478 Bytes

h-level.md

File metadata and controls

27 lines (25 loc) · 478 Bytes

h-level

Change tag of elements with 'h#' tag (e.g. <h3/>) to <ab/> and add @type='head' attribute and @rend with the old tag name as value. Invalid attributes, such as @class and @title are removed from the element.

Example

Before transformation:

<div>
  <head/>
  <p/>
  <h3 class='sth'>
    <lb/>text
  </h3>
  <p/>
</div>

After transformation:

<div>
  <head/>
  <p/>
  <ab type="head" rend="h3">
    <lb/>text
  </ab>
  <p/>
</div>