fantasticon icon indicating copy to clipboard operation
fantasticon copied to clipboard

added support for specifying codepoints as hex strings

Open lknop opened this issue 3 years ago • 4 comments

The usual notation for codepoint map is hex, which is not compatible with json by default. This PR adds support for hex string values for codepoints which are then parsed into appropriate numeric values.

The same config file can use multiple notations interchangeably:

codepoints: {
  'arrow-out': 57344,
  'exclamation-circle':'\e00d',
  'arrow-down': '0xe01d'
}

lknop avatar Mar 09 '21 07:03 lknop

Hi @lknop - thank you so much for the PR! Would it be possible to have a test or two to go with it, and maybe a couple lines of example in the Readme, as you've done for numeric values? :)

tancredi avatar Mar 17 '21 00:03 tancredi

@tancredi Sure, I will add those. I just wanted some feedback whether the change would be welcome, I should be able to push an update in the next few days.

lknop avatar Mar 17 '21 00:03 lknop

Amazing - thanks! Yes I'd say it is!

tancredi avatar Mar 17 '21 00:03 tancredi

Would love to see this!

mmoollllee avatar Aug 02 '21 12:08 mmoollllee