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.

hard-break-escape.mjs 777B

1234567891011121314151617181920212223242526272829303132
  1. var hardBreakEscape = {
  2. name: 'hardBreakEscape',
  3. tokenize: tokenizeHardBreakEscape
  4. }
  5. export default hardBreakEscape
  6. import assert from 'assert'
  7. import codes from '../character/codes.mjs'
  8. import markdownLineEnding from '../character/markdown-line-ending.mjs'
  9. import types from '../constant/types.mjs'
  10. function tokenizeHardBreakEscape(effects, ok, nok) {
  11. return start
  12. function start(code) {
  13. assert(code === codes.backslash, 'expected `\\`')
  14. effects.enter(types.hardBreakEscape)
  15. effects.enter(types.escapeMarker)
  16. effects.consume(code)
  17. return open
  18. }
  19. function open(code) {
  20. if (markdownLineEnding(code)) {
  21. effects.exit(types.escapeMarker)
  22. effects.exit(types.hardBreakEscape)
  23. return ok(code)
  24. }
  25. return nok(code)
  26. }
  27. }