Skip to content

Commit

Permalink
convert Fidonet Unicode substrings (but not in UUE blocks)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mithgol committed Sep 9, 2014
1 parent e3acf80 commit 91ad103
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fidohtml.js
@@ -1,6 +1,7 @@
var ASTree = require('astree');
var Dauria = require('dauria');
var extend = require('extend');
var Fiunis = require('fiunis');
var MIME = require('mime');
var UUE = require('uue');
var _s = require('underscore.string');
Expand Down Expand Up @@ -127,6 +128,14 @@ var FidoHTML = function(options){
}
});

// convert Fidonet Unicode substrings (but not in UUE blocks)
this.ASTree.defineSplitter(function(sourceWithFiunis){
if( typeof sourceWithFiunis !== 'string' ) return sourceWithFiunis;
return Fiunis.decode(sourceWithFiunis);
}, [
{ type: 'origin', props: ['preParens', 'addrText'] }
]);

// convert URLs to hyperlinks
this.ASTree.defineSplitter(function(sourceCode){
/* jshint -W101 */
Expand Down

0 comments on commit 91ad103

Please sign in to comment.