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.js 1002B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. 'use strict'
  2. var assert = require('assert')
  3. var codes = require('../character/codes.js')
  4. var markdownLineEnding = require('../character/markdown-line-ending.js')
  5. var types = require('../constant/types.js')
  6. function _interopDefaultLegacy(e) {
  7. return e && typeof e === 'object' && 'default' in e ? e : {default: e}
  8. }
  9. var assert__default = /*#__PURE__*/ _interopDefaultLegacy(assert)
  10. var hardBreakEscape = {
  11. name: 'hardBreakEscape',
  12. tokenize: tokenizeHardBreakEscape
  13. }
  14. function tokenizeHardBreakEscape(effects, ok, nok) {
  15. return start
  16. function start(code) {
  17. assert__default['default'](code === codes.backslash, 'expected `\\`')
  18. effects.enter(types.hardBreakEscape)
  19. effects.enter(types.escapeMarker)
  20. effects.consume(code)
  21. return open
  22. }
  23. function open(code) {
  24. if (markdownLineEnding(code)) {
  25. effects.exit(types.escapeMarker)
  26. effects.exit(types.hardBreakEscape)
  27. return ok(code)
  28. }
  29. return nok(code)
  30. }
  31. }
  32. module.exports = hardBreakEscape