annotate MoinMoin/converter/text_html_text_moin_wiki.py @ 2855:f003d451be90

text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 23 Sep 2007 08:19:55 +0200
parents fd6ad1421faf
children 244f9e89fb15
rev   line source
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
2 MoinMoin - convert from html to wiki markup
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
3
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
4 @copyright: 2005-2006 Bastian Blank, Florian Festi, Reimar Bauer,
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
5 2005-2007 MoinMoin:ThomasWaldmann
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
6 @license: GNU GPL, see COPYING for details.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
7 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
8
488
fa890b814205 added some ExpatError debug log code
Thomas Waldmann <tw@waldmann-edv.de>
parents: 452
diff changeset
9 import re, os
1879
dec60e485e49 minidom parse tree nodes need .has_key()
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1868
diff changeset
10 import xml.dom.minidom # HINT: the nodes in parse result tree need .has_key(), "x in ..." does not work
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
11 from xml.dom import Node
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
12
1914
eb68960b1dfb remove unused imports
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1908
diff changeset
13 from MoinMoin import config, wikiutil
1908
8bd4b581cc60 make converter pluggable, dynamically load correct converter, move loading of parser to send_page_content
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1886
diff changeset
14 from MoinMoin.error import ConvertError
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
15
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
16 # Portions (C) International Organization for Standardization 1986
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
17 # Permission to copy in any form is granted for use with
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
18 # conforming SGML systems and applications as defined in
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
19 # ISO 8879, provided this notice is included in all copies.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
20 dtd = ur'''
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
21 <!DOCTYPE html [
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
22 <!ENTITY nbsp "&#32;"> <!-- no-break space = non-breaking space, U+00A0, convert to U+0020 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
23 <!ENTITY iexcl "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
24 <!ENTITY cent "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
25 <!ENTITY pound "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
26 <!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
27 <!ENTITY yen "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
28 <!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar, U+00A6 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
29 <!ENTITY sect "&#167;"> <!-- section sign, U+00A7 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
30 <!ENTITY uml "&#168;"> <!-- diaeresis = spacing diaeresis, U+00A8 ISOdia -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
31 <!ENTITY copy "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
32 <!ENTITY ordf "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
33 <!ENTITY laquo "&#171;"> <!-- left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
34 <!ENTITY not "&#172;"> <!-- not sign = angled dash, U+00AC ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
35 <!ENTITY shy "&#173;"> <!-- soft hyphen = discretionary hyphen, U+00AD ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
36 <!ENTITY reg "&#174;"> <!-- registered sign = registered trade mark sign, U+00AE ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
37 <!ENTITY macr "&#175;"> <!-- macron = spacing macron = overline = APL overbar, U+00AF ISOdia -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
38 <!ENTITY deg "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
39 <!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign, U+00B1 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
40 <!ENTITY sup2 "&#178;"> <!-- superscript two = superscript digit two = squared, U+00B2 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
41 <!ENTITY sup3 "&#179;"> <!-- superscript three = superscript digit three = cubed, U+00B3 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
42 <!ENTITY acute "&#180;"> <!-- acute accent = spacing acute, U+00B4 ISOdia -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
43 <!ENTITY micro "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
44 <!ENTITY para "&#182;"> <!-- pilcrow sign = paragraph sign, U+00B6 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
45 <!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma = Greek middle dot, U+00B7 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
46 <!ENTITY cedil "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
47 <!ENTITY sup1 "&#185;"> <!-- superscript one = superscript digit one, U+00B9 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
48 <!ENTITY ordm "&#186;"> <!-- masculine ordinal indicator, U+00BA ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
49 <!ENTITY raquo "&#187;"> <!-- right-pointing double angle quotation mark = right pointing guillemet, U+00BB ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
50 <!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
51 <!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half = fraction one half, U+00BD ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
52 <!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
53 <!ENTITY iquest "&#191;"> <!-- inverted question mark = turned question mark, U+00BF ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
54 <!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
55 <!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute, U+00C1 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
56 <!ENTITY Acirc "&#194;"> <!-- latin capital letter A with circumflex, U+00C2 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
57 <!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde, U+00C3 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
58 <!ENTITY Auml "&#196;"> <!-- latin capital letter A with diaeresis, U+00C4 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
59 <!ENTITY Aring "&#197;"> <!-- latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
60 <!ENTITY AElig "&#198;"> <!-- latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
61 <!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla, U+00C7 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
62 <!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave, U+00C8 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
63 <!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute, U+00C9 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
64 <!ENTITY Ecirc "&#202;"> <!-- latin capital letter E with circumflex, U+00CA ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
65 <!ENTITY Euml "&#203;"> <!-- latin capital letter E with diaeresis, U+00CB ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
66 <!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave, U+00CC ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
67 <!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute, U+00CD ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
68 <!ENTITY Icirc "&#206;"> <!-- latin capital letter I with circumflex, U+00CE ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
69 <!ENTITY Iuml "&#207;"> <!-- latin capital letter I with diaeresis, U+00CF ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
70 <!ENTITY ETH "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
71 <!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde, U+00D1 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
72 <!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave, U+00D2 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
73 <!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute, U+00D3 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
74 <!ENTITY Ocirc "&#212;"> <!-- latin capital letter O with circumflex, U+00D4 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
75 <!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde, U+00D5 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
76 <!ENTITY Ouml "&#214;"> <!-- latin capital letter O with diaeresis, U+00D6 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
77 <!ENTITY times "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
78 <!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke = latin capital letter O slash, U+00D8 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
79 <!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave, U+00D9 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
80 <!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute, U+00DA ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
81 <!ENTITY Ucirc "&#219;"> <!-- latin capital letter U with circumflex, U+00DB ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
82 <!ENTITY Uuml "&#220;"> <!-- latin capital letter U with diaeresis, U+00DC ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
83 <!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute, U+00DD ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
84 <!ENTITY THORN "&#222;"> <!-- latin capital letter THORN, U+00DE ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
85 <!ENTITY szlig "&#223;"> <!-- latin small letter sharp s = ess-zed, U+00DF ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
86 <!ENTITY agrave "&#224;"> <!-- latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
87 <!ENTITY aacute "&#225;"> <!-- latin small letter a with acute, U+00E1 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
88 <!ENTITY acirc "&#226;"> <!-- latin small letter a with circumflex, U+00E2 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
89 <!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde, U+00E3 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
90 <!ENTITY auml "&#228;"> <!-- latin small letter a with diaeresis, U+00E4 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
91 <!ENTITY aring "&#229;"> <!-- latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
92 <!ENTITY aelig "&#230;"> <!-- latin small letter ae = latin small ligature ae, U+00E6 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
93 <!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla, U+00E7 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
94 <!ENTITY egrave "&#232;"> <!-- latin small letter e with grave, U+00E8 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
95 <!ENTITY eacute "&#233;"> <!-- latin small letter e with acute, U+00E9 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
96 <!ENTITY ecirc "&#234;"> <!-- latin small letter e with circumflex, U+00EA ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
97 <!ENTITY euml "&#235;"> <!-- latin small letter e with diaeresis, U+00EB ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
98 <!ENTITY igrave "&#236;"> <!-- latin small letter i with grave, U+00EC ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
99 <!ENTITY iacute "&#237;"> <!-- latin small letter i with acute, U+00ED ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
100 <!ENTITY icirc "&#238;"> <!-- latin small letter i with circumflex, U+00EE ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
101 <!ENTITY iuml "&#239;"> <!-- latin small letter i with diaeresis, U+00EF ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
102 <!ENTITY eth "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
103 <!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde, U+00F1 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
104 <!ENTITY ograve "&#242;"> <!-- latin small letter o with grave, U+00F2 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
105 <!ENTITY oacute "&#243;"> <!-- latin small letter o with acute, U+00F3 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
106 <!ENTITY ocirc "&#244;"> <!-- latin small letter o with circumflex, U+00F4 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
107 <!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde, U+00F5 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
108 <!ENTITY ouml "&#246;"> <!-- latin small letter o with diaeresis, U+00F6 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
109 <!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
110 <!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
111 <!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave, U+00F9 ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
112 <!ENTITY uacute "&#250;"> <!-- latin small letter u with acute, U+00FA ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
113 <!ENTITY ucirc "&#251;"> <!-- latin small letter u with circumflex, U+00FB ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
114 <!ENTITY uuml "&#252;"> <!-- latin small letter u with diaeresis, U+00FC ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
115 <!ENTITY yacute "&#253;"> <!-- latin small letter y with acute, U+00FD ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
116 <!ENTITY thorn "&#254;"> <!-- latin small letter thorn, U+00FE ISOlat1 -->
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
117 <!ENTITY yuml "&#255;"> <!-- latin small letter y with diaeresis, U+00FF ISOlat1 -->
151
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
118
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
119 <!-- Latin Extended-B -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
120 <!ENTITY fnof "&#402;"> <!-- latin small f with hook = function = florin, U+0192 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
121
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
122 <!-- Greek -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
123 <!ENTITY Alpha "&#913;"> <!-- greek capital letter alpha, U+0391 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
124 <!ENTITY Beta "&#914;"> <!-- greek capital letter beta, U+0392 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
125 <!ENTITY Gamma "&#915;"> <!-- greek capital letter gamma,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
126 U+0393 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
127 <!ENTITY Delta "&#916;"> <!-- greek capital letter delta,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
128 U+0394 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
129 <!ENTITY Epsilon "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
130 <!ENTITY Zeta "&#918;"> <!-- greek capital letter zeta, U+0396 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
131 <!ENTITY Eta "&#919;"> <!-- greek capital letter eta, U+0397 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
132 <!ENTITY Theta "&#920;"> <!-- greek capital letter theta,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
133 U+0398 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
134 <!ENTITY Iota "&#921;"> <!-- greek capital letter iota, U+0399 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
135 <!ENTITY Kappa "&#922;"> <!-- greek capital letter kappa, U+039A -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
136 <!ENTITY Lambda "&#923;"> <!-- greek capital letter lambda,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
137 U+039B ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
138 <!ENTITY Mu "&#924;"> <!-- greek capital letter mu, U+039C -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
139 <!ENTITY Nu "&#925;"> <!-- greek capital letter nu, U+039D -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
140 <!ENTITY Xi "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
141 <!ENTITY Omicron "&#927;"> <!-- greek capital letter omicron, U+039F -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
142 <!ENTITY Pi "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
143 <!ENTITY Rho "&#929;"> <!-- greek capital letter rho, U+03A1 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
144 <!-- there is no Sigmaf, and no U+03A2 character either -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
145 <!ENTITY Sigma "&#931;"> <!-- greek capital letter sigma,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
146 U+03A3 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
147 <!ENTITY Tau "&#932;"> <!-- greek capital letter tau, U+03A4 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
148 <!ENTITY Upsilon "&#933;"> <!-- greek capital letter upsilon,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
149 U+03A5 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
150 <!ENTITY Phi "&#934;"> <!-- greek capital letter phi,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
151 U+03A6 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
152 <!ENTITY Chi "&#935;"> <!-- greek capital letter chi, U+03A7 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
153 <!ENTITY Psi "&#936;"> <!-- greek capital letter psi,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
154 U+03A8 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
155 <!ENTITY Omega "&#937;"> <!-- greek capital letter omega,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
156 U+03A9 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
157
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
158 <!ENTITY alpha "&#945;"> <!-- greek small letter alpha,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
159 U+03B1 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
160 <!ENTITY beta "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
161 <!ENTITY gamma "&#947;"> <!-- greek small letter gamma,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
162 U+03B3 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
163 <!ENTITY delta "&#948;"> <!-- greek small letter delta,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
164 U+03B4 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
165 <!ENTITY epsilon "&#949;"> <!-- greek small letter epsilon,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
166 U+03B5 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
167 <!ENTITY zeta "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
168 <!ENTITY eta "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
169 <!ENTITY theta "&#952;"> <!-- greek small letter theta,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
170 U+03B8 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
171 <!ENTITY iota "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
172 <!ENTITY kappa "&#954;"> <!-- greek small letter kappa,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
173 U+03BA ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
174 <!ENTITY lambda "&#955;"> <!-- greek small letter lambda,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
175 U+03BB ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
176 <!ENTITY mu "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
177 <!ENTITY nu "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
178 <!ENTITY xi "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
179 <!ENTITY omicron "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
180 <!ENTITY pi "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
181 <!ENTITY rho "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
182 <!ENTITY sigmaf "&#962;"> <!-- greek small letter final sigma,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
183 U+03C2 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
184 <!ENTITY sigma "&#963;"> <!-- greek small letter sigma,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
185 U+03C3 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
186 <!ENTITY tau "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
187 <!ENTITY upsilon "&#965;"> <!-- greek small letter upsilon,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
188 U+03C5 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
189 <!ENTITY phi "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
190 <!ENTITY chi "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
191 <!ENTITY psi "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
192 <!ENTITY omega "&#969;"> <!-- greek small letter omega,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
193 U+03C9 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
194 <!ENTITY thetasym "&#977;"> <!-- greek small letter theta symbol,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
195 U+03D1 NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
196 <!ENTITY upsih "&#978;"> <!-- greek upsilon with hook symbol,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
197 U+03D2 NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
198 <!ENTITY piv "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
199
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
200 <!-- General Punctuation -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
201 <!ENTITY bull "&#8226;"> <!-- bullet = black small circle,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
202 U+2022 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
203 <!-- bullet is NOT the same as bullet operator, U+2219 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
204 <!ENTITY hellip "&#8230;"> <!-- horizontal ellipsis = three dot leader,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
205 U+2026 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
206 <!ENTITY prime "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
207 <!ENTITY Prime "&#8243;"> <!-- double prime = seconds = inches,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
208 U+2033 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
209 <!ENTITY oline "&#8254;"> <!-- overline = spacing overscore,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
210 U+203E NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
211 <!ENTITY frasl "&#8260;"> <!-- fraction slash, U+2044 NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
212
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
213 <!-- Letterlike Symbols -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
214 <!ENTITY weierp "&#8472;"> <!-- script capital P = power set
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
215 = Weierstrass p, U+2118 ISOamso -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
216 <!ENTITY image "&#8465;"> <!-- blackletter capital I = imaginary part,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
217 U+2111 ISOamso -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
218 <!ENTITY real "&#8476;"> <!-- blackletter capital R = real part symbol,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
219 U+211C ISOamso -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
220 <!ENTITY trade "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
221 <!ENTITY alefsym "&#8501;"> <!-- alef symbol = first transfinite cardinal,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
222 U+2135 NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
223 <!-- alef symbol is NOT the same as hebrew letter alef,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
224 U+05D0 although the same glyph could be used to depict both characters -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
225
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
226 <!-- Arrows -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
227 <!ENTITY larr "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
228 <!ENTITY uarr "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
229 <!ENTITY rarr "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
230 <!ENTITY darr "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
231 <!ENTITY harr "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
232 <!ENTITY crarr "&#8629;"> <!-- downwards arrow with corner leftwards
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
233 = carriage return, U+21B5 NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
234 <!ENTITY lArr "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
235 <!-- ISO 10646 does not say that lArr is the same as the 'is implied by' arrow
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
236 but also does not have any other character for that function. So ? lArr can
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
237 be used for 'is implied by' as ISOtech suggests -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
238 <!ENTITY uArr "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
239 <!ENTITY rArr "&#8658;"> <!-- rightwards double arrow,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
240 U+21D2 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
241 <!-- ISO 10646 does not say this is the 'implies' character but does not have
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
242 another character with this function so ?
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
243 rArr can be used for 'implies' as ISOtech suggests -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
244 <!ENTITY dArr "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
245 <!ENTITY hArr "&#8660;"> <!-- left right double arrow,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
246 U+21D4 ISOamsa -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
247
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
248 <!-- Mathematical Operators -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
249 <!ENTITY forall "&#8704;"> <!-- for all, U+2200 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
250 <!ENTITY part "&#8706;"> <!-- partial differential, U+2202 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
251 <!ENTITY exist "&#8707;"> <!-- there exists, U+2203 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
252 <!ENTITY empty "&#8709;"> <!-- empty set = null set = diameter,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
253 U+2205 ISOamso -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
254 <!ENTITY nabla "&#8711;"> <!-- nabla = backward difference,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
255 U+2207 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
256 <!ENTITY isin "&#8712;"> <!-- element of, U+2208 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
257 <!ENTITY notin "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
258 <!ENTITY ni "&#8715;"> <!-- contains as member, U+220B ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
259 <!-- should there be a more memorable name than 'ni'? -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
260 <!ENTITY prod "&#8719;"> <!-- n-ary product = product sign,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
261 U+220F ISOamsb -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
262 <!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
263 the same glyph might be used for both -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
264 <!ENTITY sum "&#8721;"> <!-- n-ary sumation, U+2211 ISOamsb -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
265 <!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
266 though the same glyph might be used for both -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
267 <!ENTITY minus "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
268 <!ENTITY lowast "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
269 <!ENTITY radic "&#8730;"> <!-- square root = radical sign,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
270 U+221A ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
271 <!ENTITY prop "&#8733;"> <!-- proportional to, U+221D ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
272 <!ENTITY infin "&#8734;"> <!-- infinity, U+221E ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
273 <!ENTITY ang "&#8736;"> <!-- angle, U+2220 ISOamso -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
274 <!ENTITY and "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
275 <!ENTITY or "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
276 <!ENTITY cap "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
277 <!ENTITY cup "&#8746;"> <!-- union = cup, U+222A ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
278 <!ENTITY int "&#8747;"> <!-- integral, U+222B ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
279 <!ENTITY there4 "&#8756;"> <!-- therefore, U+2234 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
280 <!ENTITY sim "&#8764;"> <!-- tilde operator = varies with = similar to,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
281 U+223C ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
282 <!-- tilde operator is NOT the same character as the tilde, U+007E,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
283 although the same glyph might be used to represent both -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
284 <!ENTITY cong "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
285 <!ENTITY asymp "&#8776;"> <!-- almost equal to = asymptotic to,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
286 U+2248 ISOamsr -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
287 <!ENTITY ne "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
288 <!ENTITY equiv "&#8801;"> <!-- identical to, U+2261 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
289 <!ENTITY le "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
290 <!ENTITY ge "&#8805;"> <!-- greater-than or equal to,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
291 U+2265 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
292 <!ENTITY sub "&#8834;"> <!-- subset of, U+2282 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
293 <!ENTITY sup "&#8835;"> <!-- superset of, U+2283 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
294 <!-- note that nsup, 'not a superset of, U+2283' is not covered by the Symbol
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
295 font encoding and is not included. Should it be, for symmetry?
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
296 It is in ISOamsn -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
297 <!ENTITY nsub "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
298 <!ENTITY sube "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
299 <!ENTITY supe "&#8839;"> <!-- superset of or equal to,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
300 U+2287 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
301 <!ENTITY oplus "&#8853;"> <!-- circled plus = direct sum,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
302 U+2295 ISOamsb -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
303 <!ENTITY otimes "&#8855;"> <!-- circled times = vector product,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
304 U+2297 ISOamsb -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
305 <!ENTITY perp "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
306 U+22A5 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
307 <!ENTITY sdot "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
308 <!-- dot operator is NOT the same character as U+00B7 middle dot -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
309
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
310 <!-- Miscellaneous Technical -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
311 <!ENTITY lceil "&#8968;"> <!-- left ceiling = apl upstile,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
312 U+2308 ISOamsc -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
313 <!ENTITY rceil "&#8969;"> <!-- right ceiling, U+2309 ISOamsc -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
314 <!ENTITY lfloor "&#8970;"> <!-- left floor = apl downstile,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
315 U+230A ISOamsc -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
316 <!ENTITY rfloor "&#8971;"> <!-- right floor, U+230B ISOamsc -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
317 <!ENTITY lang "&#9001;"> <!-- left-pointing angle bracket = bra,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
318 U+2329 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
319 <!-- lang is NOT the same character as U+003C 'less than'
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
320 or U+2039 'single left-pointing angle quotation mark' -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
321 <!ENTITY rang "&#9002;"> <!-- right-pointing angle bracket = ket,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
322 U+232A ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
323 <!-- rang is NOT the same character as U+003E 'greater than'
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
324 or U+203A 'single right-pointing angle quotation mark' -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
325
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
326 <!-- Geometric Shapes -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
327 <!ENTITY loz "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
328
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
329 <!-- Miscellaneous Symbols -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
330 <!ENTITY spades "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
331 <!-- black here seems to mean filled as opposed to hollow -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
332 <!ENTITY clubs "&#9827;"> <!-- black club suit = shamrock,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
333 U+2663 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
334 <!ENTITY hearts "&#9829;"> <!-- black heart suit = valentine,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
335 U+2665 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
336 <!ENTITY diams "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
337
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
338 <!-- C0 Controls and Basic Latin -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
339 <!ENTITY quot "&#34;"> <!-- quotation mark = APL quote,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
340 U+0022 ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
341 <!ENTITY amp "&#38;"> <!-- ampersand, U+0026 ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
342 <!ENTITY lt "&#60;"> <!-- less-than sign, U+003C ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
343 <!ENTITY gt "&#62;"> <!-- greater-than sign, U+003E ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
344
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
345 <!-- Latin Extended-A -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
346 <!ENTITY OElig "&#338;"> <!-- latin capital ligature OE,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
347 U+0152 ISOlat2 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
348 <!ENTITY oelig "&#339;"> <!-- latin small ligature oe, U+0153 ISOlat2 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
349 <!-- ligature is a misnomer, this is a separate character in some languages -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
350 <!ENTITY Scaron "&#352;"> <!-- latin capital letter S with caron,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
351 U+0160 ISOlat2 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
352 <!ENTITY scaron "&#353;"> <!-- latin small letter s with caron,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
353 U+0161 ISOlat2 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
354 <!ENTITY Yuml "&#376;"> <!-- latin capital letter Y with diaeresis,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
355 U+0178 ISOlat2 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
356
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
357 <!-- Spacing Modifier Letters -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
358 <!ENTITY circ "&#710;"> <!-- modifier letter circumflex accent,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
359 U+02C6 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
360 <!ENTITY tilde "&#732;"> <!-- small tilde, U+02DC ISOdia -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
361
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
362 <!-- General Punctuation -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
363 <!ENTITY ensp "&#8194;"> <!-- en space, U+2002 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
364 <!ENTITY emsp "&#8195;"> <!-- em space, U+2003 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
365 <!ENTITY thinsp "&#8201;"> <!-- thin space, U+2009 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
366 <!ENTITY zwnj "&#8204;"> <!-- zero width non-joiner,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
367 U+200C NEW RFC 2070 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
368 <!ENTITY zwj "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
369 <!ENTITY lrm "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
370 <!ENTITY rlm "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
371 <!ENTITY ndash "&#8211;"> <!-- en dash, U+2013 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
372 <!ENTITY mdash "&#8212;"> <!-- em dash, U+2014 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
373 <!ENTITY lsquo "&#8216;"> <!-- left single quotation mark,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
374 U+2018 ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
375 <!ENTITY rsquo "&#8217;"> <!-- right single quotation mark,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
376 U+2019 ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
377 <!ENTITY sbquo "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
378 <!ENTITY ldquo "&#8220;"> <!-- left double quotation mark,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
379 U+201C ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
380 <!ENTITY rdquo "&#8221;"> <!-- right double quotation mark,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
381 U+201D ISOnum -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
382 <!ENTITY bdquo "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
383 <!ENTITY dagger "&#8224;"> <!-- dagger, U+2020 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
384 <!ENTITY Dagger "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
385 <!ENTITY permil "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
386 <!ENTITY lsaquo "&#8249;"> <!-- single left-pointing angle quotation mark,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
387 U+2039 ISO proposed -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
388 <!-- lsaquo is proposed but not yet ISO standardized -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
389 <!ENTITY rsaquo "&#8250;"> <!-- single right-pointing angle quotation mark,
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
390 U+203A ISO proposed -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
391 <!-- rsaquo is proposed but not yet ISO standardized -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
392 <!ENTITY euro "&#8364;"> <!-- euro sign, U+20AC NEW -->
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
393
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
394 ]>
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
395 '''
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
396
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
397 class visitor(object):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
398 def do(self, tree):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
399 self.visit_node_list(tree.childNodes)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
400
188
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
401 def visit_node_list(self, nodelist):
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
402 for node in nodelist:
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
403 self.visit(node)
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
404
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
405 def visit(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
406 nodeType = node.nodeType
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
407 if node.nodeType == Node.ELEMENT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
408 return self.visit_element(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
409 elif node.nodeType == Node.ATTRIBUTE_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
410 return self.visit_attribute(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
411 elif node.nodeType == Node.TEXT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
412 return self.visit_text(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
413 elif node.nodeType == Node.CDATA_SECTION_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
414 return self.visit_cdata_section(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
415
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
416 def visit_element(self, node):
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
417 if len(node.childNodes):
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
418 self.visit_node_list(node.childNodes)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
419
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
420 def visit_attribute(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
421 pass
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
422
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
423 def visit_text(self, node):
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
424 pass
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
425
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
426 def visit_cdata_section(self, node):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
427 pass
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
428
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
429
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
430 class strip_whitespace(visitor):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
431
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
432 def visit_element(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
433 if node.localName == 'p':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
434 # XXX: our formatter adds a whitespace at the end of each paragraph
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
435 if node.hasChildNodes() and node.childNodes[-1].nodeType == Node.TEXT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
436 data = node.childNodes[-1].data.rstrip('\n ')
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
437 # Remove it if empty
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
438 if data == '':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
439 node.removeChild(node.childNodes[-1])
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
440 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
441 node.childNodes[-1].data = data
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
442 # Remove empty paragraphs
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
443 if not node.hasChildNodes():
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
444 node.parentNode.removeChild(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
445
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
446 if node.hasChildNodes():
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
447 self.visit_node_list(node.childNodes)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
448
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
449
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
450 class convert_tree(visitor):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
451 white_space = object()
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
452 new_line = object()
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
453 new_line_dont_remove = object()
854
a71bcc0f27c3 fixed MoinMoinBugs:GuiEditorDeletesNewBulletText
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 834
diff changeset
454
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
455 def __init__(self, request, pagename):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
456 self.request = request
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
457 self.pagename = pagename
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
458
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
459 def do(self, tree):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
460 self.depth = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
461 self.text = []
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
462 self.visit(tree.documentElement)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
463 self.check_whitespace()
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
464 return ''.join(self.text)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
465
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
466 def check_whitespace(self):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
467 i = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
468 text = self.text
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
469 while i < len(text):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
470 if text[i] is self.white_space:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
471 if i == 0 or i == len(text)-1:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
472 del text[i]
275
8236b972ea7d better use .startswith/.endswith instead of [0]/[-1]
Thomas Waldmann <tw@waldmann-edv.de>
parents: 258
diff changeset
473 elif text[i-1].endswith(" ") or text[i-1].endswith("\n"):
215
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
474 # last char of previous element is whitespace
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
475 del text[i]
215
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
476 elif (text[i+1] is self.white_space or
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
477 # next element is white_space
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
478 text[i+1] is self.new_line):
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
479 # or new_line
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
480 del text[i]
275
8236b972ea7d better use .startswith/.endswith instead of [0]/[-1]
Thomas Waldmann <tw@waldmann-edv.de>
parents: 258
diff changeset
481 elif text[i+1].startswith(" ") or text[i+1].startswith("\n"):
215
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
482 # first char of next element is whitespace
188
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
483 del text[i]
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
484 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
485 text[i] = " "
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
486 i += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
487 elif text[i] is self.new_line:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
488 if i == 0:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
489 del text[i]
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
490 elif i == len(text) - 1:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
491 text[i] = "\n"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
492 i += 1
275
8236b972ea7d better use .startswith/.endswith instead of [0]/[-1]
Thomas Waldmann <tw@waldmann-edv.de>
parents: 258
diff changeset
493 elif text[i-1].endswith("\n") or (
8236b972ea7d better use .startswith/.endswith instead of [0]/[-1]
Thomas Waldmann <tw@waldmann-edv.de>
parents: 258
diff changeset
494 isinstance(text[i+1], str) and text[i+1].startswith("\n")):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
495 del text[i]
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
496 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
497 text[i] = "\n"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
498 i += 1
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
499 elif text[i] is self.new_line_dont_remove:
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
500 text[i] = "\n"
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
501 i += 1
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
502 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
503 i += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
504
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
505 def visit_text(self, node):
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
506 self.text.append(node.data)
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
507
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
508 def visit_element(self, node):
276
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
509 name = node.localName
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
510 if name is None: # not sure this can happen here (DOM comment node), but just for the case
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
511 return
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
512 func = getattr(self, "process_%s" % name, None)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
513 if func:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
514 func(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
515 else:
216
5654512900ca GUI editor: fixed traceback for inline elements outside <p>
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 215
diff changeset
516 self.process_inline(node)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
517
188
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
518 def visit_node_list_element_only(self, nodelist):
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
519 for node in nodelist:
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
520 if node.nodeType == Node.ELEMENT_NODE:
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
521 self.visit_element(node)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
522
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
523 def node_list_text_only(self, nodelist):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
524 result = []
188
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
525 for node in nodelist:
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
526 if node.nodeType == Node.TEXT_NODE:
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
527 result.append(node.data)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
528 else:
188
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
529 result.extend(self.node_list_text_only(node.childNodes))
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
530 return "".join(result)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
531
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
532 def process_page(self, node):
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
533 for i in node.childNodes:
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
534 if i.nodeType == Node.ELEMENT_NODE:
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
535 self.visit_element(i)
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
536 elif i.nodeType == Node.TEXT_NODE: # if this is missing, all std text under a headline is dropped!
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
537 txt = i.data.strip() # IMPORTANT: don't leave this unstripped or there will be wrong blanks
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
538 if txt:
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
539 self.text.append(txt)
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
540 #we use <pre class="comment"> now, so this is currently unused:
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
541 #elif i.nodeType == Node.COMMENT_NODE:
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
542 # self.text.append(i.data)
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
543 # self.text.append("\n")
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
544
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
545 def process_br(self, node):
2847
dc9048024d49 text_html_text_moin_wiki: reverted changeset 2840
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2840
diff changeset
546 self.text.append(self.new_line) # without this, std multi-line text below some heading misses a whitespace
dc9048024d49 text_html_text_moin_wiki: reverted changeset 2840
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2840
diff changeset
547 # when it gets merged to float text, like word word wordword word word
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
548
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
549 def process_heading(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
550 text = self.node_list_text_only(node.childNodes).strip()
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
551 if text:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
552 depth = int(node.localName[1]) - 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
553 hstr = "=" * depth
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
554 self.text.append(self.new_line)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
555 self.text.append("%s %s %s" % (hstr, text.replace("\n", " "), hstr))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
556 self.text.append(self.new_line)
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
557
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
558 process_h1 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
559 process_h2 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
560 process_h3 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
561 process_h4 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
562 process_h5 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
563 process_h6 = process_heading
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
564
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
565 def _get_list_item_markup(self, list, listitem):
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
566 before = ""
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
567 #indent = str(self.depth) * self.depth # nice for debugging :)
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
568 indent = " " * self.depth
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
569 markup = ""
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
570 name = list.localName
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
571 if name == 'ol':
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
572 class_ = listitem.getAttribute("class")
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
573 if class_ == "gap":
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
574 before = self.new_line_dont_remove
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
575 if list.hasAttribute("type"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
576 type = list.getAttribute("type")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
577 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
578 type = "1"
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
579 markup = "%s. " % type
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
580 elif name == 'ul':
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
581 class_ = listitem.getAttribute("class")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
582 if class_ == "gap":
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
583 before = self.new_line_dont_remove
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
584 style = listitem.getAttribute("style")
1005
e1e1885deec1 whitespace-only cleanup, fix regex by using raw string
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 999
diff changeset
585 if re.match(ur"list-style-type:\s*none", style, re.I):
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
586 markup = ". "
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
587 else:
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
588 markup = "* "
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
589 elif name == 'dl':
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
590 markup = ":: "
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
591 else:
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
592 raise ConvertError("Illegal list type %s" % name)
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
593 return before, indent, markup
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
594
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
595 def process_dl(self, node):
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
596 self.depth += 1
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
597 markup = ":: " # can there be a dl dd without dt?
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
598 for i in node.childNodes:
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
599 if i.nodeType == Node.ELEMENT_NODE:
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
600 name = i.localName
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
601 if name == 'dt':
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
602 before, indent, markup = self._get_list_item_markup(node, i)
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
603 self.text.extend([before, indent])
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
604 text = self.node_list_text_only(i.childNodes)
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
605 self.text.append(text.replace("\n", " "))
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
606 elif name == 'dd':
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
607 self.text.append(markup)
878
d825de2173d5 add comment to GUI converter, add missing packages to setup.py
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 862
diff changeset
608 self.process_list_item(i, indent) # XXX no dt -> indent is undefined!!!
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
609 else:
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
610 raise ConvertError("Illegal list element %s" % i.localName)
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
611 self.depth -= 1
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
612 if self.depth == 0:
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
613 self.text.append(self.new_line_dont_remove)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
614
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
615 def process_list(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
616 self.depth += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
617 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
618 if i.nodeType == Node.ELEMENT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
619 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
620 if name == 'li':
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
621 before, indent, markup = self._get_list_item_markup(node, i)
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
622 self.text.extend([before, indent, markup])
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
623 self.process_list_item(i, indent)
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
624 elif name in ('ol', 'ul', ):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
625 self.process_list(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
626 elif name == 'dl':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
627 self.process_dl(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
628 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
629 raise ConvertError("Illegal list element %s" % i.localName)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
630 self.depth -= 1
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
631 if self.depth == 0:
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
632 self.text.append(self.new_line_dont_remove)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
633
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
634 process_ul = process_list
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
635 process_ol = process_list
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
636
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
637 def empty_paragraph_queue(self, nodelist, indent, need_indent):
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
638 if need_indent:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
639 self.text.append(indent)
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
640 for i in nodelist:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
641 if i.nodeType == Node.ELEMENT_NODE:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
642 self.process_inline(i)
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
643 elif i.nodeType == Node.TEXT_NODE:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
644 self.text.append(i.data.strip('\n').replace('\n', ' '))
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
645 self.text.append(self.new_line)
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
646 del nodelist[:]
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
647
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
648 def process_list_item(self, node, indent):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
649 found = False
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
650 need_indent = False
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
651 pending = []
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
652 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
653 name = i.localName
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
654
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
655 if name in ('p', 'pre', 'ol', 'ul', 'dl', 'table', ) and pending:
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
656 self.empty_paragraph_queue(pending, indent, need_indent)
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
657 need_indent = True
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
658
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
659 if name == 'p':
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
660 if need_indent:
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
661 self.text.append(indent)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
662 self.process_paragraph_item(i)
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
663 self.text.append(self.new_line)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
664 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
665 elif name == 'pre':
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
666 if need_indent:
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
667 self.text.append(indent)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
668 self.process_preformatted_item(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
669 found = True
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
670 elif name in ('ol', 'ul', ):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
671 self.process_list(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
672 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
673 elif name == 'dl':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
674 self.process_dl(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
675 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
676 elif name == 'table':
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
677 if need_indent:
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
678 self.text.append(indent)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
679 self.process_table(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
680 found = True
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
681 else:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
682 pending.append(i)
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
683
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
684 if found:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
685 need_indent = True
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
686
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
687 if pending:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
688 self.empty_paragraph_queue(pending, indent, need_indent)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
689
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
690 def process_blockquote(self, node):
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
691 # XXX this does not really work. e.g.:
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
692 # <bq>aaaaaa
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
693 # <hr---------->
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
694 # <bq>bbbbbb
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
695 self.depth += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
696 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
697 if i.nodeType == Node.ELEMENT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
698 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
699 if name == 'p':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
700 self.text.append(self.new_line)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
701 self.text.append(" " * self.depth)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
702 self.process_p(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
703 elif name == 'pre':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
704 self.text.append(self.new_line)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
705 self.text.append(" " * self.depth)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
706 self.process_pre(i)
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
707 elif name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6', ):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
708 self.process_heading(i)
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
709 elif name in ('ol', 'ul', ):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
710 self.process_list(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
711 elif name == 'dl':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
712 self.process_dl(i)
1757
d4f3fc3f0afc gui converter: don't crash on col/colgroup/meta/a (ported from 1.5-788)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1740
diff changeset
713 elif name == 'a':
d4f3fc3f0afc gui converter: don't crash on col/colgroup/meta/a (ported from 1.5-788)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1740
diff changeset
714 self.process_a(i)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
715 elif name == 'img':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
716 self.process_img(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
717 elif name == 'div':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
718 self.visit_node_list_element_only(i.childNodes)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
719 elif name == 'blockquote':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
720 self.process_blockquote(i)
407
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
721 elif name == 'hr':
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
722 self.process_hr(i)
bea43f99cc27 star-merged moin--refactor--1.5 (formatter, parser, converter fixes, see docs/CHANGES.refactor)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 294
diff changeset
723 elif name == 'br':
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
724 self.process_br(i)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
725 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
726 raise ConvertError("process_blockquote: Don't support %s element" % name)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
727 self.depth -= 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
728
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
729 def process_inline(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
730 if node.nodeType == Node.TEXT_NODE:
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
731 self.text.append(node.data.strip('\n').replace('\n', ' '))
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
732 return
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
733
1700
c54be3afb830 gui editor converter: indenting fixes, code simplification
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1649
diff changeset
734 # do we need to check for Node.ELEMENT_NODE and return (do nothing)?
276
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
735 name = node.localName # can be None for DOM Comment nodes
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
736 if name is None:
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
737 return
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
738
2850
8a5c932ad8ab text_html_text_moin_wiki: added unsupported tags to process_inline
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2849
diff changeset
739 # unsupported tags
8a5c932ad8ab text_html_text_moin_wiki: added unsupported tags to process_inline
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2849
diff changeset
740 if name in (u'title', u'meta', u'style'):
8a5c932ad8ab text_html_text_moin_wiki: added unsupported tags to process_inline
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2849
diff changeset
741 return
8a5c932ad8ab text_html_text_moin_wiki: added unsupported tags to process_inline
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2849
diff changeset
742
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
743 if name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6', ): # headers are not allowed here (e.g. inside a ul li),
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
744 text = self.node_list_text_only(node.childNodes).strip() # but can be inserted via the editor
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
745 self.text.append(text) # so we just drop the header markup and keep the text
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
746 return
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
747
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
748 func = getattr(self, "process_%s" % name, None)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
749 if func:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
750 func(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
751 return
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
752
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
753 command_close = None
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
754 if name in ('em', 'i', ):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
755 command = "''"
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
756 elif name in ('strong', 'b', ):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
757 command = "'''"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
758 elif name == 'u':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
759 command = "__"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
760 elif name == 'big':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
761 command = "~+"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
762 command_close = "+~"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
763 elif name == 'small':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
764 command = "~-"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
765 command_close = "-~"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
766 elif name == 'strike':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
767 command = "--("
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
768 command_close = ")--"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
769 elif name == 'sub':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
770 command = ",,"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
771 elif name == 'sup':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
772 command = "^"
1757
d4f3fc3f0afc gui converter: don't crash on col/colgroup/meta/a (ported from 1.5-788)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1740
diff changeset
773 elif name in ('font', 'meta', ):
d4f3fc3f0afc gui converter: don't crash on col/colgroup/meta/a (ported from 1.5-788)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1740
diff changeset
774 command = "" # just throw away unsupported elements
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
775 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
776 raise ConvertError("process_inline: Don't support %s element" % name)
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
777
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
778 self.text.append(command)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
779 for i in node.childNodes:
1700
c54be3afb830 gui editor converter: indenting fixes, code simplification
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1649
diff changeset
780 self.process_inline(i)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
781 if command_close:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
782 command = command_close
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
783 self.text.append(command)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
784
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
785 def process_span(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
786 # ignore span tags - just descend
645
8da03e8daeb0 fix vanishing strike markup after gui editor usage (backport to 1.5)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 607
diff changeset
787 is_strike = node.getAttribute("class") == "strike"
8da03e8daeb0 fix vanishing strike markup after gui editor usage (backport to 1.5)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 607
diff changeset
788 if is_strike:
8da03e8daeb0 fix vanishing strike markup after gui editor usage (backport to 1.5)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 607
diff changeset
789 self.text.append("--(")
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
790 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
791 self.process_inline(i)
645
8da03e8daeb0 fix vanishing strike markup after gui editor usage (backport to 1.5)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 607
diff changeset
792 if is_strike:
8da03e8daeb0 fix vanishing strike markup after gui editor usage (backport to 1.5)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 607
diff changeset
793 self.text.append(")--")
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
794
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
795 def process_div(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
796 # ignore div tags - just descend
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
797 for i in node.childNodes:
854
a71bcc0f27c3 fixed MoinMoinBugs:GuiEditorDeletesNewBulletText
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 834
diff changeset
798 self.visit(i)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
799
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
800 def process_tt(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
801 text = self.node_list_text_only(node.childNodes).replace("\n", " ")
1515
b3a47164c22a fix backticks vs. curly brackets confusion of gui converter (backport to 1.5)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1318
diff changeset
802 if node.getAttribute("class") == "backtick":
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
803 self.text.append("`%s`" % text)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
804 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
805 self.text.append("{{{%s}}}" % text)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
806
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
807 def process_hr(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
808 if node.hasAttribute("class"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
809 class_ = node.getAttribute("class")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
810 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
811 class_ = "hr0"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
812 if class_.startswith("hr") and class_[2] in "123456":
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
813 length = int(class_[2]) + 4
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
814 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
815 length = 4
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
816 self.text.extend([self.new_line, "-" * length, self.new_line])
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
817
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
818 def process_p(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
819 self.process_paragraph_item(node)
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
820 self.text.append("\n\n") # do not use self.new_line here!
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
821
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
822 def process_paragraph_item(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
823 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
824 if i.nodeType == Node.ELEMENT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
825 self.process_inline(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
826 elif i.nodeType == Node.TEXT_NODE:
559
77e2149d7eab fix gui converter html \n processing
Thomas Waldmann <tw@waldmann-edv.de>
parents: 544
diff changeset
827 self.text.append(i.data.strip('\n').replace('\n', ' '))
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
828
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
829 def process_pre(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
830 self.process_preformatted_item(node)
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
831 self.text.append(self.new_line)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
832
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
833 def process_preformatted_item(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
834 if node.hasAttribute("class"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
835 class_ = node.getAttribute("class")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
836 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
837 class_ = None
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
838 if class_ == "comment": # we currently use this for stuff like ## or #acl
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
839 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
840 if i.nodeType == Node.TEXT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
841 self.text.append(i.data)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
842 #print "'%s'" % i.data
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
843 elif i.localName == 'br':
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
844 self.text.append(self.new_line)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
845 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
846 pass
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
847 #print i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
848 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
849 self.text.extend(["{{{", self.new_line])
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
850 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
851 if i.nodeType == Node.TEXT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
852 self.text.append(i.data)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
853 #print "'%s'" % i.data
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
854 elif i.localName == 'br':
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
855 self.text.append(self.new_line_dont_remove)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
856 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
857 pass
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
858 #print i.localName
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
859 self.text.extend(["}}}", self.new_line])
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
860
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
861 _alignment = {"left": "(",
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
862 "center": ":",
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
863 "right": ")",
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
864 "top": "^",
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
865 "bottom": "v"}
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
866
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
867 def _check_length(self, value):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
868 try:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
869 int(value)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
870 return value + 'px'
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
871 except ValueError:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
872 return value
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
873
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
874 def _table_style(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
875 result = []
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
876 if node.hasAttribute("bgcolor"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
877 value = node.getAttribute("bgcolor")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
878 match = re.match(r"rgb\((\d+),\s*(\d+),\s*(\d+)\)", value)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
879 if match:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
880 result.append('tablebgcolor="#%X%X%X"' %
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
881 (int(match.group(1)),
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
882 int(match.group(2)),
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
883 int(match.group(3))))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
884 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
885 result.append('tablebgcolor="%s"' % value)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
886 if node.hasAttribute("width"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
887 value = node.getAttribute("width")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
888 result.append('tablewidth="%s"' % self._check_length(value))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
889 if node.hasAttribute("height"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
890 value = node.getAttribute("height")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
891 result.append('tableheight="%s"' % self._check_length(value))
277
08778f685aaf begin fixing http://moinmoin.wikiwikiweb.de/MoinMoinBugs/GuiEditorDestroysTableStyles (incomplete)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 276
diff changeset
892 if node.hasAttribute("align"):
08778f685aaf begin fixing http://moinmoin.wikiwikiweb.de/MoinMoinBugs/GuiEditorDestroysTableStyles (incomplete)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 276
diff changeset
893 value = node.getAttribute("align")
08778f685aaf begin fixing http://moinmoin.wikiwikiweb.de/MoinMoinBugs/GuiEditorDestroysTableStyles (incomplete)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 276
diff changeset
894 result.append('tablealign="%s"' % value)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
895 if node.hasAttribute("style"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
896 result.append('tablestyle="%s"' % node.getAttribute("style"))
531
f6a74f85b9d7 fix tableclass attr for gui editor
Thomas Waldmann <tw@waldmann-edv.de>
parents: 488
diff changeset
897 if node.hasAttribute("class"):
f6a74f85b9d7 fix tableclass attr for gui editor
Thomas Waldmann <tw@waldmann-edv.de>
parents: 488
diff changeset
898 result.append('tableclass="%s"' % node.getAttribute("class"))
544
bdaea0dcf3b1 converter: fix table/row/cell style spaces
Thomas Waldmann <tw@waldmann-edv.de>
parents: 531
diff changeset
899 return " ".join(result).strip()
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
900
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
901 def _row_style(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
902 result = []
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
903 if node.hasAttribute("bgcolor"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
904 value = node.getAttribute("bgcolor")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
905 match = re.match(r"rgb\((\d+),\s*(\d+),\s*(\d+)\)", value)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
906 if match:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
907 result.append('rowbgcolor="#%X%X%X"' %
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
908 (int(match.group(1)),
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
909 int(match.group(2)),
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
910 int(match.group(3))))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
911 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
912 result.append('rowbgcolor="%s"' % value)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
913 if node.hasAttribute("style"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
914 result.append('rowstyle="%s"' % node.getAttribute("style"))
1649
65d05bbcd436 GUI converter: don't throw away rowclass in tables
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1515
diff changeset
915 if node.hasAttribute("class"):
65d05bbcd436 GUI converter: don't throw away rowclass in tables
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1515
diff changeset
916 result.append('rowclass="%s"' % node.getAttribute("class"))
544
bdaea0dcf3b1 converter: fix table/row/cell style spaces
Thomas Waldmann <tw@waldmann-edv.de>
parents: 531
diff changeset
917 return " ".join(result).strip()
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
918
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
919 def _cell_style(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
920 if node.hasAttribute("rowspan"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
921 rowspan = ("|%s" % node.getAttribute("rowspan"))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
922 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
923 rowspan = ""
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
924
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
925 if node.hasAttribute("colspan"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
926 colspan = int(node.getAttribute("colspan"))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
927 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
928 colspan = 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
929
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
930 spanning = rowspan or colspan > 1
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
931
544
bdaea0dcf3b1 converter: fix table/row/cell style spaces
Thomas Waldmann <tw@waldmann-edv.de>
parents: 531
diff changeset
932 align = ""
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
933 result = []
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
934 if node.hasAttribute("bgcolor"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
935 value = node.getAttribute("bgcolor")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
936 match = re.match(r"rgb\((\d+),\s*(\d+),\s*(\d+)\)", value)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
937 if match:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
938 result.append("#%X%X%X" % (int(match.group(1)),
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
939 int(match.group(2)),
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
940 int(match.group(3))))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
941 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
942 result.append('bgcolor="%s"' % value)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
943 if node.hasAttribute("align"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
944 value = node.getAttribute("align")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
945 if not spanning or value != "center":
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
946 # ignore "center" in spanning cells
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
947 align += self._alignment.get(value, "")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
948 if node.hasAttribute("valign"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
949 value = node.getAttribute("valign")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
950 if not spanning or value != "center":
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
951 # ignore "center" in spanning cells
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
952 align += self._alignment.get(value, "")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
953 if node.hasAttribute("width"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
954 value = node.getAttribute("width")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
955 if value[-1] == "%":
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
956 align += value
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
957 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
958 result.append('width="%s"' % self._check_length(value))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
959 if node.hasAttribute("height"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
960 value = node.getAttribute("height")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
961 result.append('height="%s"' % self._check_length(value))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
962 if node.hasAttribute("class"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
963 result.append('class="%s"' % node.getAttribute("class"))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
964 if node.hasAttribute("id"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
965 result.append('id="%s"' % node.getAttribute("id"))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
966 if node.hasAttribute("style"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
967 result.append('style="%s"' % node.getAttribute("style"))
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
968
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
969 if align:
862
7e103a2591db fixed table alignment in gui editor converter (backport to 1.5)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 854
diff changeset
970 result.insert(0, "%s" % align)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
971 result.append(rowspan)
544
bdaea0dcf3b1 converter: fix table/row/cell style spaces
Thomas Waldmann <tw@waldmann-edv.de>
parents: 531
diff changeset
972 return " ".join(result).strip()
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
973
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
974 def process_table(self, node, style=""):
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
975 self.text.append(self.new_line)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
976 self.new_table = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
977 style += self._table_style(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
978 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
979 if i.nodeType == Node.ELEMENT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
980 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
981 if name == 'tr':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
982 self.process_table_record(i, style)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
983 style = ""
294
3cbbedfb89af converter: handle thead and tfoot tags
Thomas Waldmann <tw@waldmann-edv.de>
parents: 277
diff changeset
984 elif name in ('thead', 'tbody', 'tfoot'):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
985 self.process_table(i, style)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
986 elif name == 'caption':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
987 self.process_caption(node, i, style)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
988 style = ''
2849
9ed226998cce text_html_text_moin_wiki: ignore 'strong' in process_table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2847
diff changeset
989 elif name in ('col', 'colgroup', 'strong', ):
1757
d4f3fc3f0afc gui converter: don't crash on col/colgroup/meta/a (ported from 1.5-788)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1740
diff changeset
990 pass # we don't support these, but we just ignore them
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
991 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
992 raise ConvertError("process_table: Don't support %s element" % name)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
993 #else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
994 # raise ConvertError("Unexpected node: %r" % i)
2847
dc9048024d49 text_html_text_moin_wiki: reverted changeset 2840
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2840
diff changeset
995 self.text.append(self.new_line_dont_remove)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
996
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
997 def process_caption(self, table, node, style=""):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
998 # get first row
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
999 for i in table.childNodes:
294
3cbbedfb89af converter: handle thead and tfoot tags
Thomas Waldmann <tw@waldmann-edv.de>
parents: 277
diff changeset
1000 if i.localName in ('thead', 'tbody', 'tfoot'): # XXX is this correct?
3cbbedfb89af converter: handle thead and tfoot tags
Thomas Waldmann <tw@waldmann-edv.de>
parents: 277
diff changeset
1001 #if i.localName == 'tbody': (old version)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1002 for i in i.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1003 if i.localName == 'tr':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1004 break
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1005 break
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1006 elif i.localName == 'tr':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1007 break
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1008 # count columns
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1009 if i.localName == 'tr':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1010 colspan = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1011 for td in i.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1012 if not td.nodeType == Node.ELEMENT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1013 continue
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1014 span = td.getAttribute('colspan')
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1015 try:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1016 colspan += int(span)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1017 except ValueError:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1018 colspan += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1019 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1020 colspan = 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1021 text = self.node_list_text_only(node.childNodes).replace('\n', ' ').strip()
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1022 if text:
1736
6e4acd9904d7 fix wrong merging of significant newline chars (fixes wrong removal of empty lines in pre sections, fixes wrong merging of tables separates by empty line, fixes wrong removal of li/ol gaps, add empty line after lists)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1725
diff changeset
1023 self.text.extend(["%s'''%s%s'''||" % ('||' * colspan, style, text), self.new_line_dont_remove])
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1024
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1025 def process_table_data(self, node, style=""):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1026 if node.hasAttribute("colspan"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1027 colspan = int(node.getAttribute("colspan"))
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1028 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1029 colspan = 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1030 self.text.append("||" * colspan)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1031
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1032 style += self._cell_style(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1033 if style:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1034 self.text.append("<%s>" % style)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1035
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1036 found = False
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1037 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1038 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1039 if name == 'p':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1040 self.process_paragraph_item(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1041 self.text.append(self.white_space)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1042 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1043 if not found:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1044 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1045 if i.nodeType == Node.ELEMENT_NODE:
2855
f003d451be90 text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2852
diff changeset
1046 if name == 'br':
f003d451be90 text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2852
diff changeset
1047 # if we get a br for an empty cell from e.g. cut and paste from OOo
f003d451be90 text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2852
diff changeset
1048 # to the gui it should be appended as white_space.
f003d451be90 text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2852
diff changeset
1049 self.text.append(self.white_space)
f003d451be90 text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2852
diff changeset
1050 found = True
f003d451be90 text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2852
diff changeset
1051 else:
f003d451be90 text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2852
diff changeset
1052 self.process_inline(i)
f003d451be90 text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2852
diff changeset
1053 found = True
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1054 elif i.nodeType == Node.TEXT_NODE:
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
1055 data = i.data.strip('\n').replace('\n', ' ')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1056 if data:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1057 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1058 self.text.append(data)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1059 if not found:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1060 self.text.append(" ")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1061
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1062 def process_table_record(self, node, style=""):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1063 if not self.new_table:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1064 self.text.append(" " * self.depth)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1065 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1066 self.new_table = False
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1067 style += self._row_style(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1068 for i in node.childNodes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1069 if i.nodeType == Node.ELEMENT_NODE:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1070 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1071 if name == 'td':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1072 self.process_table_data(i, style=style)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1073 style = ""
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1074 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
1075 raise ConvertError("process_table_record: Don't support %s element" % name)
2847
dc9048024d49 text_html_text_moin_wiki: reverted changeset 2840
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 2840
diff changeset
1076 self.text.extend(["||", self.new_line_dont_remove])
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1077
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1078 def process_a(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1079 scriptname = self.request.getScriptname()
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1080 if scriptname == "":
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1081 scriptname = "/"
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1082 # can either be a link (with href) or an anchor (with e.g. id)
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1083 href = node.attributes.get("href", None)
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1084 if href:
101
2202f548cbb0 use own urllib wrapper, see wikiutil
Thomas Waldmann <tw@waldmann-edv.de>
parents: 48
diff changeset
1085 href = wikiutil.url_unquote(href.nodeValue)
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1086 id = node.attributes.get("id", None)
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1087 if id:
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1088 id = id.nodeValue
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
1089
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1090 if href:
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1091 title = class_ = interwikiname = None
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1092
1879
dec60e485e49 minidom parse tree nodes need .has_key()
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1868
diff changeset
1093 if node.attributes.has_key("title"):
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1094 title = node.attributes.get("title").nodeValue
1879
dec60e485e49 minidom parse tree nodes need .has_key()
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1868
diff changeset
1095 if node.attributes.has_key("class"):
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1096 class_ = node.attributes.get("class").nodeValue
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1097
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1098 text = self.node_list_text_only(node.childNodes)
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1099 text = text.replace("\n", " ").lstrip()
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1100
1700
c54be3afb830 gui editor converter: indenting fixes, code simplification
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1649
diff changeset
1101 # interwiki link
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1102 if class_ == "interwiki":
2728
59b3d8b8971f remove (un)quoteName, new functions split_interwiki() and resolve_interwiki(), cleanup interwiki mess, fix some link markup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2725
diff changeset
1103 wikitag, wikiurl, wikitail, err = wikiutil.resolve_interwiki(
59b3d8b8971f remove (un)quoteName, new functions split_interwiki() and resolve_interwiki(), cleanup interwiki mess, fix some link markup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2725
diff changeset
1104 self.request, title, "")
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1105 if not err and href.startswith(wikiurl):
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1106 pagename = wikiutil.url_unquote(href[len(wikiurl):].lstrip('/'))
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1107 interwikiname = "%s:%s" % (wikitag, pagename)
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
1108 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
1109 raise ConvertError("Invalid InterWiki link: '%s'" % href)
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1110 elif class_ == "badinterwiki" and title:
652
483d2c0ee1f4 fix deletion of empty interwiki links (backport to 1.5)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 645
diff changeset
1111 if href == "/": # we used this as replacement for empty href
483d2c0ee1f4 fix deletion of empty interwiki links (backport to 1.5)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 645
diff changeset
1112 href = ""
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1113 pagename = wikiutil.url_unquote(href)
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1114 interwikiname = "%s:%s" % (title, pagename)
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
1115 if interwikiname and pagename == text:
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1116 if ' ' in interwikiname:
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1117 self.text.append("[[%s]]" % interwikiname)
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1118 else:
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1119 self.text.append("%s" % interwikiname)
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1120 return
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1121 elif title == 'Self':
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1122 self.text.append('[[%s|%s]]' % (href, text))
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1123 return
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1124 elif interwikiname:
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1125 self.text.append("[[%s|%s]]" % (interwikiname, text))
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1126 return
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
1127
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1128 # fix links generated by a broken copy & paste of gecko based browsers
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1129 brokenness = '../../../..'
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1130 if href.startswith(brokenness):
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1131 href = href[len(brokenness):] # just strip it away!
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1132 # TODO: IE pastes complete http://server/Page/SubPage as href and as text, too
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1133
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1134 # Attachments
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1135 if title and title.startswith("attachment:"):
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1136 attname = wikiutil.url_unquote(title[len("attachment:"):])
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1137 if attname != text or ' ' in attname:
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1138 self.text.append('[[attachment:%s|%s]]' % (attname, text))
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
1139 else:
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1140 self.text.extend([self.white_space, 'attachment:%s' % attname, self.white_space])
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1141 # wiki link
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1142 elif href.startswith(scriptname):
826
8e880418d736 remove all underscore <-> blank magic
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 734
diff changeset
1143 pagename = href[len(scriptname):]
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1144 pagename = pagename.lstrip('/') # XXX temp fix for generated pagenames starting with /
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1145 if text == pagename:
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
1146 self.text.append(wikiutil.pagelinkmarkup(pagename))
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1147 # relative link /SubPage
1886
7055054118f4 GUI converter: fixed conversion of relative wiki links
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1879
diff changeset
1148 elif text.startswith('/') and href.endswith(text):
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1149 if pagename.startswith(self.pagename): # is this a subpage of us?
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1150 self.text.append(wikiutil.pagelinkmarkup(pagename[len(self.pagename):]))
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1151 else:
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1152 self.text.append(wikiutil.pagelinkmarkup(pagename))
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1153 # relative link ../
1886
7055054118f4 GUI converter: fixed conversion of relative wiki links
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1879
diff changeset
1154 elif text.startswith('../') and href.endswith(text[3:]):
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1155 self.text.append(wikiutil.pagelinkmarkup(text))
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1156 # labeled link
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1157 else:
2773
2bbf611f4f2c add link text parameter to pagelinkmarkup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2771
diff changeset
1158 self.text.append(wikiutil.pagelinkmarkup(pagename, text))
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1159 # mailto link
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1160 elif href.startswith("mailto:"):
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1161 if href[len("mailto:"):] == text:
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1162 self.text.extend([self.white_space, text, self.white_space])
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1163 else:
2773
2bbf611f4f2c add link text parameter to pagelinkmarkup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2771
diff changeset
1164 self.text.append("[[%s|%s]]" % (href, text)) # XXX use a (renamed) pagelinkmarkup
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1165 # simple link
215
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
1166 elif href.replace(" ", "%20") == text:
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
1167 self.text.append("%s" % text)
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1168 # imagelink
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1169 elif text == "" and wikiutil.isPicture(href):
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1170 self.text.append("[[%s]]" % href)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1171 # labeled link
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1172 else:
215
86fafd465ab1 GUI editor: fixed spaces in URLs and whitespace handling
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 188
diff changeset
1173 href = href.replace(" ", "%20")
2771
1134a5cc12c2 gui converter fixes for new markup, fix/extend tests, remove unused code
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2728
diff changeset
1174 self.text.append("[[%s|%s]]" % (href, text))
36
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1175 elif id:
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1176 pass # we dont support anchors yet
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1177
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1178 def process_img(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1179 src = None
1879