3 var returner = require('./returner');
5 module.exports = enter;
7 /* Shortcut and collapsed link references need no escaping
8 * and encoding during the processing of child nodes (it
9 * must be implied from identifier).
11 * This toggler turns encoding and escaping off for shortcut
12 * and collapsed references.
14 * Implies `enterLink`.
16 function enter(compiler, node) {
17 var encode = compiler.encode;
18 var escape = compiler.escape;
19 var exit = compiler.enterLink();
22 node.referenceType !== 'shortcut' &&
23 node.referenceType !== 'collapsed'
28 compiler.escape = returner;
29 compiler.encode = returner;
32 compiler.encode = encode;
33 compiler.escape = escape;