markdown+bracketed_spans custom-style shorthand #10623
STrRedWolf
started this conversation in
Ideas
Replies: 2 comments
-
A cleaner workaround is to use a Lua filter that finds Span elements with class "Bar" and adds the "custom-style" attribute. This would be 4 lines or so of Lua and would run very efficiently as part of a pandoc conversion. |
Beta Was this translation helpful? Give feedback.
0 replies
-
So something like: function Span(elem)
if #elem.classes > 0 then
elem.attributes["custom-style"]=elem.classes[1]
end
return elem
end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
An idea I'm tossing out here. The context here is that I'm writing stories in Markdown but there are frequent uses of different styles in the resulting Word DOCX file. I'm using a reference doc to define those styles, but having to keep writing
custom-style="Foo"
in my text is rather tedious.So, I propose a shorthand, so that:
[This text would translate into something awesome]{.Bar}
would be taken as:
[This text would translate into something awesome]{custom-style="Bar"}
I've worked around this with the following code:
Beta Was this translation helpful? Give feedback.
All reactions