snippets: add an HTML snippets for MC
Co-Authored-by: iGor milhit <igor@milhit.ch>
parent
544891631a
commit
694ef949b4
|
@ -0,0 +1,34 @@
|
|||
-- My HTML snippets
|
||||
|
||||
-- Set the local variables (shortcuts)
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local i = ls.insert_node
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
|
||||
return {
|
||||
s(
|
||||
{
|
||||
trig = "mcim",
|
||||
name = "Main article structure for MC portal",
|
||||
dscr = "Insert an HTML structure to add bibliographic description on the clinical medicine portal"
|
||||
},
|
||||
-- Below, the duplicate of brackets is for escaping delimiters
|
||||
fmt(
|
||||
[[
|
||||
<article class="mc-{1}-main">
|
||||
<style>
|
||||
.mc-{1}-item li:not([class])::before,
|
||||
.mc-{1}-item li::before {{}}
|
||||
</style>
|
||||
</article>
|
||||
]],
|
||||
{
|
||||
i(1, "Class identifier")
|
||||
},
|
||||
{
|
||||
repeat_duplicates = true
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue