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.

image-reference.js 946B

12345678910111213141516171819202122232425262728293031323334353637
  1. module.exports = imageReference
  2. imageReference.peek = imageReferencePeek
  3. var association = require('../util/association')
  4. var safe = require('../util/safe')
  5. function imageReference(node, _, context) {
  6. var type = node.referenceType
  7. var exit = context.enter('imageReference')
  8. var subexit = context.enter('label')
  9. var alt = safe(context, node.alt, {before: '[', after: ']'})
  10. var value = '![' + alt + ']'
  11. var reference
  12. var stack
  13. subexit()
  14. // Hide the fact that we’re in phrasing, because escapes don’t work.
  15. stack = context.stack
  16. context.stack = []
  17. subexit = context.enter('reference')
  18. reference = safe(context, association(node), {before: '[', after: ']'})
  19. subexit()
  20. context.stack = stack
  21. exit()
  22. if (type === 'full' || !alt || alt !== reference) {
  23. value += '[' + reference + ']'
  24. } else if (type !== 'shortcut') {
  25. value += '[]'
  26. }
  27. return value
  28. }
  29. function imageReferencePeek() {
  30. return '!'
  31. }