jieverson / hyperemoji

:bowtie: Emoji :keyword: plugin for Hyper.

Home Page:https://www.npmjs.com/package/hyperemoji

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

random spaces are getting added to output

tjbenton opened this issue · comments

  • OS version and name: Mac 10.12.6 Sierra
  • Hyper.app version: 1.10.14, build ec19526
  • The issue is reproducible in vanilla Hyper.app: The bug doesn't happen if hyperemoji isn't installed
  • .hyper.js:
Configuration
module.exports={
  config: {
    fontSize: 15,
    fontFamily: 'Source Code Pro',
    cursorColor: 'rgba(248,28,229,0.75)',
    cursorShape: 'BLOCK',
    foregroundColor: '#fff',
    backgroundColor: '#000',
    borderColor: '#333',
    css: '',
    termCSS: '',
    padding: '0px 5px 5px',
    colors: {
      black: '#000000',
      red: '#ff0000',
      green: '#33ff00',
      yellow: '#ffff00',
      blue: '#0066ff',
      magenta: '#cc00ff',
      cyan: '#00ffff',
      white: '#d0d0d0',
      lightBlack: '#808080',
      lightRed: '#ff0000',
      lightGreen: '#33ff00',
      lightYellow: '#ffff00',
      lightBlue: '#0066ff',
      lightMagenta: '#cc00ff',
      lightCyan: '#00ffff',
      lightWhite: '#ffffff'
    },
    shell: '',
    summon: {
      hideDock: false,
      hideOnBlur: false,
      hotkey: 'Option+`'
    }
  },
  plugins: [
    'hyperterm-1password',
    'hyperterm-tabs',
    "hypertitle",
    "hypercwd",
    "hyperterm-material",
    "hyperterm-summon",
    "hyper-search",
    "hyperterm-tab-icons",
    "hyperemoji",
    "hyper-pane"
  ],
  localPlugins: []
}

Issue

I'm encountering a very strange bug where random spaces seem to be getting added to the output. But only when it's printed in hyper.

Given the following code I would expect timestamp to be something like this 10:31:36, but instead I'm getting results like this 10:31: 36 when It logs it in the console.

const now = new Date()
const timestamp = [ now.getHours(), now.getMinutes(), now.getSeconds() ]
  .map((number) => number < 10 ? `0${number}` : number)
  .join(':')

here's the code I used to test if there was a space, and to see if there were any special characters that might have been added.

console.log('')
console.log('timestamp:', timestamp)
console.log('JSON.stringify(timestamp):', JSON.stringify(timestamp))
console.log("timestamp.replace(/\\s+/g, ''):", timestamp.replace(/\s+/g, ''))
console.log('/\\s/.test(timestamp):', /\s/.test(timestamp))
console.log("timestamp.split(''):", timestamp.split(''));
console.log('')

Here's the output that I get from Hyper

screen shot 2017-09-12 at 10 36 17 am

Here's the output that I get from ITerm 2

screen shot 2017-09-12 at 10 37 04 am

Here's the output that I get from Terminal

screen shot 2017-09-12 at 10 38 09 am

Hmm, yeah I just now figured out that this was the plugin that was causing this issue for me as well.