Skip to content

Instantly share code, notes, and snippets.

@arlolra
Created April 26, 2019 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arlolra/00234bcf08197af244a1127a30c9254c to your computer and use it in GitHub Desktop.
Save arlolra/00234bcf08197af244a1127a30c9254c to your computer and use it in GitHub Desktop.
diff --git a/lib/wt2html/DOMPostProcessor.js b/lib/wt2html/DOMPostProcessor.js
index 5fee865a..6ed7c77a 100644
--- a/lib/wt2html/DOMPostProcessor.js
+++ b/lib/wt2html/DOMPostProcessor.js
@@ -133,19 +133,26 @@ function DOMPostProcessor(env, options) {
shortcut: 'tplwrap',
omit: options.inTemplate,
},
+ {
+ name: 'HandleLinkNeighbours',
+ shortcut: 'dom-linkneighbour',
+ isTraverser: true,
+ handlers: [
+ {
+ nodeName: 'a',
+ action: HandleLinkNeighbours.handleLinkNeighbours,
+ },
+ ],
+ },
// 1. Link prefixes and suffixes
// 2. Unpack DOM fragments
// FIXME: Picked a terse 'v' varname instead of trying to find
// a suitable name that addresses both functions above.
{
- name: 'HandleLinkNeighbours,UnpackDOMFragments',
+ name: 'UnpackDOMFragments',
shortcut: 'dom-unpack',
isTraverser: true,
handlers: [
- {
- nodeName: 'a',
- action: HandleLinkNeighbours.handleLinkNeighbours,
- },
{
nodeName: null,
action: UnpackDOMFragments.unpackDOMFragments,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment