File: html_entities.ecr

package info (click to toggle)
crystal 1.14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 24,384 kB
  • sloc: javascript: 6,400; sh: 695; makefile: 269; ansic: 121; python: 105; cpp: 77; xml: 32
file content (24 lines) | stat: -rw-r--r-- 662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# This file was automatically generated by running:
#
#   scripts/generate_html_entities.cr
#
# DO NOT EDIT

module HTML
  # :nodoc:
  SINGLE_CHAR_ENTITIES = {
    <%- single_char_entities.each do |name, entity| -%>
      <%= name.inspect %>.to_slice => '\u{<%= "%06X" % entity.codepoints[0] %>}',
    <%- end -%>
  } of Bytes => Char

  # :nodoc:
  DOUBLE_CHAR_ENTITIES = {
    <%- double_char_entities.each do |name, entity| -%>
      <%= name.inspect %>.to_slice => "\u{<%= "%04X" % entity.codepoints[0] %>}\u{<%= "%04X" % entity.codepoints[1] %>}",
    <%- end -%>
  } of Bytes => String

  # :nodoc:
  MAX_ENTITY_NAME_SIZE = <%= max_entity_name_size %>
end