Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

unsafe.js 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. module.exports = [
  2. {
  3. character: '\t',
  4. inConstruct: ['codeFencedLangGraveAccent', 'codeFencedLangTilde']
  5. },
  6. {
  7. character: '\r',
  8. inConstruct: [
  9. 'codeFencedLangGraveAccent',
  10. 'codeFencedLangTilde',
  11. 'codeFencedMetaGraveAccent',
  12. 'codeFencedMetaTilde',
  13. 'destinationLiteral',
  14. 'headingAtx'
  15. ]
  16. },
  17. {
  18. character: '\n',
  19. inConstruct: [
  20. 'codeFencedLangGraveAccent',
  21. 'codeFencedLangTilde',
  22. 'codeFencedMetaGraveAccent',
  23. 'codeFencedMetaTilde',
  24. 'destinationLiteral',
  25. 'headingAtx'
  26. ]
  27. },
  28. {
  29. character: ' ',
  30. inConstruct: ['codeFencedLangGraveAccent', 'codeFencedLangTilde']
  31. },
  32. // An exclamation mark can start an image, if it is followed by a link or
  33. // a link reference.
  34. {character: '!', after: '\\[', inConstruct: 'phrasing'},
  35. // A quote can break out of a title.
  36. {character: '"', inConstruct: 'titleQuote'},
  37. // A number sign could start an ATX heading if it starts a line.
  38. {atBreak: true, character: '#'},
  39. {character: '#', inConstruct: 'headingAtx', after: '(?:[\r\n]|$)'},
  40. // Dollar sign and percentage are not used in markdown.
  41. // An ampersand could start a character reference.
  42. {character: '&', after: '[#A-Za-z]', inConstruct: 'phrasing'},
  43. // An apostrophe can break out of a title.
  44. {character: "'", inConstruct: 'titleApostrophe'},
  45. // A left paren could break out of a destination raw.
  46. {character: '(', inConstruct: 'destinationRaw'},
  47. {before: '\\]', character: '(', inConstruct: 'phrasing'},
  48. // A right paren could start a list item or break out of a destination
  49. // raw.
  50. {atBreak: true, before: '\\d+', character: ')'},
  51. {character: ')', inConstruct: 'destinationRaw'},
  52. // An asterisk can start thematic breaks, list items, emphasis, strong.
  53. {atBreak: true, character: '*'},
  54. {character: '*', inConstruct: 'phrasing'},
  55. // A plus sign could start a list item.
  56. {atBreak: true, character: '+'},
  57. // A dash can start thematic breaks, list items, and setext heading
  58. // underlines.
  59. {atBreak: true, character: '-'},
  60. // A dot could start a list item.
  61. {atBreak: true, before: '\\d+', character: '.', after: '(?:[ \t\r\n]|$)'},
  62. // Slash, colon, and semicolon are not used in markdown for constructs.
  63. // A less than can start html (flow or text) or an autolink.
  64. // HTML could start with an exclamation mark (declaration, cdata, comment),
  65. // slash (closing tag), question mark (instruction), or a letter (tag).
  66. // An autolink also starts with a letter.
  67. // Finally, it could break out of a destination literal.
  68. {atBreak: true, character: '<', after: '[!/?A-Za-z]'},
  69. {character: '<', after: '[!/?A-Za-z]', inConstruct: 'phrasing'},
  70. {character: '<', inConstruct: 'destinationLiteral'},
  71. // An equals to can start setext heading underlines.
  72. {atBreak: true, character: '='},
  73. // A greater than can start block quotes and it can break out of a
  74. // destination literal.
  75. {atBreak: true, character: '>'},
  76. {character: '>', inConstruct: 'destinationLiteral'},
  77. // Question mark and at sign are not used in markdown for constructs.
  78. // A left bracket can start definitions, references, labels,
  79. {atBreak: true, character: '['},
  80. {character: '[', inConstruct: ['phrasing', 'label', 'reference']},
  81. // A backslash can start an escape (when followed by punctuation) or a
  82. // hard break (when followed by an eol).
  83. // Note: typical escapes are handled in `safe`!
  84. {character: '\\', after: '[\\r\\n]', inConstruct: 'phrasing'},
  85. // A right bracket can exit labels.
  86. {
  87. character: ']',
  88. inConstruct: ['label', 'reference']
  89. },
  90. // Caret is not used in markdown for constructs.
  91. // An underscore can start emphasis, strong, or a thematic break.
  92. {atBreak: true, character: '_'},
  93. {before: '[^A-Za-z]', character: '_', inConstruct: 'phrasing'},
  94. {character: '_', after: '[^A-Za-z]', inConstruct: 'phrasing'},
  95. // A grave accent can start code (fenced or text), or it can break out of
  96. // a grave accent code fence.
  97. {atBreak: true, character: '`'},
  98. {
  99. character: '`',
  100. inConstruct: [
  101. 'codeFencedLangGraveAccent',
  102. 'codeFencedMetaGraveAccent',
  103. 'phrasing'
  104. ]
  105. },
  106. // Left brace, vertical bar, right brace are not used in markdown for
  107. // constructs.
  108. // A tilde can start code (fenced).
  109. {atBreak: true, character: '~'}
  110. ]