-- My HTML snippets -- Below, the duplicate of brackets, for instance in the CSS code, is for -- escaping delimiters. -- 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 { -- A main snippet setting the outer structure, with the style tag. -- Should be completed with the nested article item below. s( { trig = "mcim", name = "Main article structure for MC portal", dscr = "Insert an HTML structure to add bibliographic description on the clinical medicine portal." }, fmt( [[
{2}
]], { i(1, "Class identifier"), i(0) }, { repeat_duplicates = true } ) ), -- Snippet that inserts an article with bibliographic metatada, to be nested -- in the upper main structure. s( { trig = "mcii", name = "Item article structure for MC portal", dscr = "Insert an HTML structure to add an item bibliographic description on the clinical medicine portal." }, fmt( [[
{2} ]], { i(1, "Class identifier"), i(0) }, { repeat_duplicates = true } ) ), -- Snippet that insert a list item with a link to an ebook online. s( { trig = "eli", name = "List item for an ebook link", dscr = "Insert a link for an ebook nested in a list item. Designed for the medicine portal HTML structure." }, fmt( [[
  • Livre électronique en ligne .
  • ]], { i(1, "Ebook URL"), i(2, "Language code (2 chars)"), i(3, "Language name") } ) ) }