15: def initialize(text, *args)
16: @_text = text
17: @skip_tags = true;
18: @p_prefix = "<p class=typo>";
19: @p_postfix = "</p>";
20: @a_soft = true;
21: @indent_a = "images/z.gif width=25 height=1 border=0 alt=\'\' align=top />"
22: @indent_b = "images/z.gif width=50 height=1 border=0 alt=\'\' align=top />"
23: @fixed_size = 80
24: @ignore = /notypo/
25:
26: @de_nobr = true;
27:
28: @phonemasks = [[ /([0-9]{4})\-([0-9]{2})\-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})/,
29: /([0-9]{4})\-([0-9]{2})\-([0-9]{2})/,
30: /(\([0-9\+\-]+\)) ?([0-9]{3})\-([0-9]{2})\-([0-9]{2})/,
31: /(\([0-9\+\-]+\)) ?([0-9]{2})\-([0-9]{2})\-([0-9]{2})/,
32: /(\([0-9\+\-]+\)) ?([0-9]{3})\-([0-9]{2})/,
33: /(\([0-9\+\-]+\)) ?([0-9]{2})\-([0-9]{3})/,
34: /([0-9]{3})\-([0-9]{2})\-([0-9]{2})/,
35: /([0-9]{2})\-([0-9]{2})\-([0-9]{2})/,
36: /([0-9]{1})\-([0-9]{2})\-([0-9]{2})/,
37: /([0-9]{2})\-([0-9]{3})/,
38: /([0-9]+)\-([0-9]+)/,
39: ],[
40: '<nobr>\1–\2–\3 \4:\5:\6</nobr>',
41: '<nobr>\1–\2–\3</nobr>',
42: '<nobr>\1 \2–\3–\4</nobr>',
43: '<nobr>\1 \2–\3–\4</nobr>',
44: '<nobr>\1 \2–\3</nobr>',
45: '<nobr>\1 \2–\3</nobr>',
46: '<nobr>\1–\2–\3</nobr>',
47: '<nobr>\1–\2–\3</nobr>',
48: '<nobr>\1–\2–\3</nobr>',
49: '<nobr>\1–\2</nobr>',
50: '<nobr>\1–\2</nobr>'
51: ]]
52:
53: @glueleft = ['рис.', 'табл.', 'см.', 'им.', 'ул.', 'пер.', 'кв.', 'офис', 'оф.', 'г.']
54: @glueright = ['руб.', 'коп.', 'у.е.', 'мин.']
55:
56: @settings = {
57: "inches" => true,
58: "laquo" => true,
59: "farlaquo" => false,
60: "quotes" => true,
61: "dash" => true,
62: "emdash" => true,
63: "(c)" => true,
64: "(r)" => true,
65: "(tm)" => true,
66: "(p)" => true,
67: "+-" => true,
68: "degrees" => true,
69: "<-->" => true,
70: "dashglue" => true, "wordglue" => true,
71: "spacing" => true,
72: "phones" => true,
73: "fixed" => false,
74: "html" => false
75: }
76:
77: @indent_a = "<!--indent-->"
78: @indent_b = "<!--indent-->"
79:
80: @mark_tag = "\xF0\xF0\xF0\xF0"
81: @mark_ignored = "\201"
82: end