Skip to content

Instantly share code, notes, and snippets.

@Merovex
Last active April 2, 2023 16:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Merovex/05e3216f8f4f6e965cd9d564b1496719 to your computer and use it in GitHub Desktop.
Save Merovex/05e3216f8f4f6e965cd9d564b1496719 to your computer and use it in GitHub Desktop.
-- Converts "* * *" Horizontal Rule to a "#" separator in Word DOCX
local hashrule = [[<w:p>
<w:pPr>
<w:pStyle w:val="HorizontalRule"/>
<w:ind w:firstLine="0"/>
<w:jc w:val="center"/>
</w:pPr>
<w:r>
<w:t>#</w:t>
</w:r>
</w:p>]]
function HorizontalRule (elem)
if FORMAT == 'docx' then
return pandoc.RawBlock('openxml', hashrule)
end
end
@Merovex
Copy link
Author

Merovex commented Jul 26, 2020

Corrected the comment to reflect what it's doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment