this repo has no description

Merge pull request #22 from TheV360/v360-small-lang-tag

add small and lang tags

authored by

12 and committed by
GitHub
434b0af0 a8963ebe

+15
+7
parse.js
··· 442 442 } break; case '\\sup': { 443 443 OPEN('superscript') 444 444 word_maybe() 445 + } break; case '\\small': { 446 + OPEN('small') 447 + word_maybe() 445 448 } break; case '\\b': { 446 449 OPEN('bold') 447 450 word_maybe() ··· 490 493 if (!is_color(color)) 491 494 color = null 492 495 OPEN('background_color', {color}) 496 + } break; case '\\lang': { 497 + let [lang] = rargs 498 + OPEN('language', {lang}) 499 + word_maybe() 493 500 }} 494 501 } break; case 'STYLE': { 495 502 let c = check_style(token, text.charAt(match.index-1)||"\n", text.charAt(REGEX.lastIndex)||"\n")
+8
render.js
··· 297 297 298 298 superscript: 𐀶`<sup>`, 299 299 300 + small: 𐀶`<small>`, 301 + 300 302 /*anchor: function({name}) { 301 303 let e = this() 302 304 e.id = "Markup-anchor-"+name ··· 326 328 e.dataset.bgcolor = color 327 329 return e 328 330 }.bind(𐀶`<span class='M-background'>`), 331 + 332 + language: function({lang}) { 333 + let e = this() 334 + e.lang = lang 335 + return e 336 + }.bind(𐀶`<span>`), 329 337 330 338 invalid: function({text, reason}) { 331 339 let e = this()