We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39bd88b commit 2e85d5aCopy full SHA for 2e85d5a
.editorconfig
@@ -17,3 +17,7 @@ indent_style = tab
17
[*.json]
18
indent_style = space
19
indent_size = 2
20
+
21
+[*.rb]
22
+indent_style = space
23
+indent_size = 2
scripts/nf-preview.rb
@@ -0,0 +1,15 @@
1
+#!/usr/bin/env ruby
2
+require "yaml"
3
4
+LANGUAGES_FILE = File.expand_path("../../languages.yaml", __FILE__)
5
6
+languages = YAML.safe_load_file(ARGV[0] || LANGUAGES_FILE, symbolize_names: true)
7
8
+languages.each do |language, attributes|
9
+ icon = attributes[:icon]
10
+ next if icon.nil?
11
+ match = /\A\\u\{([A-F0-9]{4,})\}\z/i.match(icon)
12
+ raise "Icon for #{language} is not in the correct format: `#{icon}`" unless match
13
+ glyph = match.captures[0].hex.chr("UTF-8")
14
+ puts "#{language}: #{glyph}"
15
+end
0 commit comments