1 package org.simantics.scl.compiler.markdown.inlines;
3 import java.io.BufferedReader;
4 import java.io.InputStreamReader;
5 import java.nio.charset.Charset;
7 import gnu.trove.map.hash.THashMap;
9 public class Entities {
10 public static final THashMap<String, String> ENTITY_MAP = new THashMap<String, String>();
11 public static int MAX_ENTITY_LENGTH;
15 BufferedReader reader = new BufferedReader(new InputStreamReader(Entities.class.getResourceAsStream("entities.dat"), Charset.forName("UTF-8")));
17 MAX_ENTITY_LENGTH = 0;
18 while((line = reader.readLine()) != null) {
21 int p = line.indexOf(' ');
22 String entity = line.substring(0, p);
23 String character = line.substring(p+1);
24 ENTITY_MAP.put(entity, character);
25 MAX_ENTITY_LENGTH = Math.max(MAX_ENTITY_LENGTH, entity.length());
27 } catch(Exception e) {