(text)
| 62 | const titleCaseSmallWords = "a an the at by for in of on to up and as but with or nor if console.log".split(" "); |
| 63 | |
| 64 | function capitalizeTitle(text) { |
| 65 | return text.split(" ") |
| 66 | .map(word => titleCaseSmallWords.includes(word) ? word : word[0].toUpperCase() + word.slice(1)) |
| 67 | .join(" ") |
| 68 | } |
| 69 | |
| 70 | function transformInline(tokens, options, prevType) { |
| 71 | let capitalize = options.capitalizeTitles && prevType == "heading_open" |