annotate MoinMoin/converter/text_html_text_moin_wiki.py @ 1318:760002b5ffa3

use url_prefix_static = '/moin_static160' instead of url_prefix = '/wiki' to avoid user confusion and stale caches
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 18 Aug 2006 23:23:27 +0200
parents e1e1885deec1
children b3a47164c22a
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
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
4 @copyright: (c) Bastian Blank, Florian Festi, Thomas Waldmann
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
5 @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
6 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
7
488
fa890b814205 added some ExpatError debug log code
Thomas Waldmann <tw@waldmann-edv.de>
parents: 452
diff changeset
8 import re, os
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
9 import xml.dom.minidom
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
10 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
11
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
12 from MoinMoin import config, wikiutil, error
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
13
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
14 # 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
15 # 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
16 # 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
17 # 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
18 dtd = ur'''
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
19 <!DOCTYPE html [
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
20 <!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
21 <!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
22 <!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
23 <!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
24 <!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
25 <!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
26 <!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
27 <!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
28 <!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
29 <!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
30 <!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
31 <!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
32 <!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
33 <!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
34 <!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
35 <!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
36 <!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
37 <!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
38 <!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
39 <!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
40 <!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
41 <!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
42 <!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
43 <!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
44 <!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
45 <!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
46 <!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
47 <!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
48 <!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
49 <!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
50 <!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
51 <!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
52 <!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
53 <!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
54 <!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
55 <!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
56 <!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
57 <!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
58 <!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
59 <!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
60 <!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
61 <!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
62 <!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
63 <!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
64 <!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
65 <!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
66 <!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
67 <!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
68 <!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
69 <!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
70 <!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
71 <!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
72 <!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
73 <!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
74 <!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
75 <!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
76 <!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
77 <!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
78 <!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
79 <!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
80 <!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
81 <!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
82 <!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
83 <!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
84 <!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
85 <!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
86 <!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
87 <!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
88 <!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
89 <!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
90 <!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
91 <!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
92 <!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
93 <!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
94 <!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
95 <!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
96 <!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
97 <!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
98 <!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
99 <!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
100 <!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
101 <!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
102 <!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
103 <!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
104 <!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
105 <!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
106 <!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
107 <!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
108 <!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
109 <!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
110 <!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
111 <!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
112 <!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
113 <!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
114 <!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
115 <!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
116
226b379bde22 added missing HTML entities to the text_html_text_x_moin converter
Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
parents: 101
diff changeset
117 <!-- 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
118 <!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
119
226b379bde22 added 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 <!-- 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
121 <!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
122 <!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
123 <!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
124 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
125 <!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
126 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
127 <!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
128 <!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
129 <!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
130 <!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
131 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
132 <!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
133 <!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
134 <!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
135 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
136 <!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
137 <!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
138 <!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
139 <!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
140 <!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
141 <!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
142 <!-- 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
143 <!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
144 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
145 <!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
146 <!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
147 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
148 <!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
149 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
150 <!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
151 <!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
152 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
153 <!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
154 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
155
226b379bde22 added 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 <!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
157 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
158 <!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
159 <!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
160 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
161 <!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
162 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
163 <!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
164 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
165 <!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
166 <!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
167 <!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
168 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
169 <!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
170 <!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
171 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
172 <!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
173 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
174 <!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
175 <!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
176 <!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
177 <!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
178 <!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
179 <!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
180 <!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
181 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
182 <!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
183 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
184 <!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
185 <!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
186 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
187 <!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
188 <!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
189 <!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
190 <!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
191 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
192 <!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
193 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
194 <!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
195 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
196 <!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
197
226b379bde22 added 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 <!-- 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
199 <!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
200 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
201 <!-- 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
202 <!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
203 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
204 <!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
205 <!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
206 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
207 <!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
208 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
209 <!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
210
226b379bde22 added 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 <!-- 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
212 <!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
213 = 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
214 <!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
215 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
216 <!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
217 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
218 <!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
219 <!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
220 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
221 <!-- 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
222 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
223
226b379bde22 added 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 <!-- 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
225 <!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
226 <!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
227 <!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
228 <!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
229 <!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
230 <!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
231 = 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
232 <!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
233 <!-- 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
234 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
235 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
236 <!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
237 <!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
238 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
239 <!-- 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
240 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
241 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
242 <!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
243 <!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
244 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
245
226b379bde22 added 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 <!-- 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
247 <!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
248 <!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
249 <!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
250 <!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
251 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
252 <!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
253 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
254 <!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
255 <!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
256 <!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
257 <!-- 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
258 <!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
259 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
260 <!-- 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
261 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
262 <!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
263 <!-- 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
264 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
265 <!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
266 <!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
267 <!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
268 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
269 <!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
270 <!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
271 <!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
272 <!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
273 <!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
274 <!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
275 <!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
276 <!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
277 <!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
278 <!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
279 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
280 <!-- 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
281 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
282 <!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
283 <!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
284 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
285 <!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
286 <!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
287 <!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
288 <!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
289 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
290 <!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
291 <!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
292 <!-- 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
293 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
294 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
295 <!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
296 <!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
297 <!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
298 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
299 <!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
300 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
301 <!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
302 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
303 <!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
304 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
305 <!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
306 <!-- 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
307
226b379bde22 added 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 <!-- 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
309 <!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
310 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
311 <!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
312 <!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
313 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
314 <!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
315 <!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
316 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
317 <!-- 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
318 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
319 <!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
320 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
321 <!-- 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
322 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
323
226b379bde22 added 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 <!-- 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
325 <!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
326
226b379bde22 added 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 <!-- 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
328 <!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
329 <!-- 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
330 <!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
331 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
332 <!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
333 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
334 <!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
335
226b379bde22 added 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 <!-- 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
337 <!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
338 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
339 <!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
340 <!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
341 <!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
342
226b379bde22 added 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 <!-- 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
344 <!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
345 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
346 <!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
347 <!-- 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
348 <!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
349 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
350 <!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
351 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
352 <!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
353 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
354
226b379bde22 added 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 <!-- 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
356 <!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
357 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
358 <!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
359
226b379bde22 added 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 <!-- 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
361 <!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
362 <!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
363 <!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
364 <!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
365 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
366 <!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
367 <!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
368 <!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
369 <!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
370 <!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
371 <!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
372 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
373 <!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
374 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
375 <!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
376 <!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
377 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
378 <!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
379 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
380 <!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
381 <!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
382 <!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
383 <!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
384 <!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
385 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
386 <!-- 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
387 <!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
388 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
389 <!-- 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
390 <!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
391
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
392 ]>
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
393 '''
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
394
828
902c34d95085 quoting for attachment filenames, wikiutil.load_wikimap, split_wiki can parse quoting, join_wiki does url_quote
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 826
diff changeset
395 def pagename_from_url(url_frag):
902c34d95085 quoting for attachment filenames, wikiutil.load_wikimap, split_wiki can parse quoting, join_wiki does url_quote
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 826
diff changeset
396 """ url is a fragment of an URL we extract the pagename from by URL-unqouting
902c34d95085 quoting for attachment filenames, wikiutil.load_wikimap, split_wiki can parse quoting, join_wiki does url_quote
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 826
diff changeset
397 and possible adding quotes around the pagename if we detect blanks in it.
902c34d95085 quoting for attachment filenames, wikiutil.load_wikimap, split_wiki can parse quoting, join_wiki does url_quote
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 826
diff changeset
398 """
833
f6e52d938ba3 gui converter: use easy markup for links with pagename = linktext
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 832
diff changeset
399 pagename = qpagename = wikiutil.url_unquote(url_frag)
828
902c34d95085 quoting for attachment filenames, wikiutil.load_wikimap, split_wiki can parse quoting, join_wiki does url_quote
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 826
diff changeset
400 if " " in pagename:
902c34d95085 quoting for attachment filenames, wikiutil.load_wikimap, split_wiki can parse quoting, join_wiki does url_quote
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 826
diff changeset
401 if not '"' in pagename:
833
f6e52d938ba3 gui converter: use easy markup for links with pagename = linktext
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 832
diff changeset
402 qpagename = '"%s"' % pagename
828
902c34d95085 quoting for attachment filenames, wikiutil.load_wikimap, split_wiki can parse quoting, join_wiki does url_quote
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 826
diff changeset
403 elif not "'" in pagename:
833
f6e52d938ba3 gui converter: use easy markup for links with pagename = linktext
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 832
diff changeset
404 qpagename = "'%s'" % pagename
f6e52d938ba3 gui converter: use easy markup for links with pagename = linktext
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 832
diff changeset
405 return pagename, qpagename
828
902c34d95085 quoting for attachment filenames, wikiutil.load_wikimap, split_wiki can parse quoting, join_wiki does url_quote
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 826
diff changeset
406
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
407 class ConvertError(error.FatalError):
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
408 """ Raise when html to wiki conversion fails """
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
409 name = "MoinMoin Convert Error"
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
410
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
411
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
412 class visitor(object):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
413 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
414 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
415
188
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
416 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
417 for node in nodelist:
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
418 self.visit(node)
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
419
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
420 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
421 nodeType = node.nodeType
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
422 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
423 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
424 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
425 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
426 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
427 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
428 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
429 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
430
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
431 def visit_element(self, node):
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
432 if len(node.childNodes):
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
433 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
434
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
435 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
436 pass
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
437
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
438 def visit_text(self, node):
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
439 pass
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
440
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
441 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
442 pass
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
443
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
444
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
445 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
446
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
447 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
448 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
449 # 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
450 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
451 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
452 # 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
453 if data == '':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
454 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
455 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
456 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
457 # Remove empty paragraphs
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
458 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
459 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
460
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
461 if node.hasChildNodes():
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
462 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
463
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
464
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
465 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
466 white_space = object()
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
467 new_line = object()
854
a71bcc0f27c3 fixed MoinMoinBugs:GuiEditorDeletesNewBulletText
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 834
diff changeset
468
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
469 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
470 self.request = request
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
471 self.pagename = pagename
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
472
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
473 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
474 self.depth = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
475 self.text = []
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
476 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
477 self.check_whitespace()
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
478 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
479
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
480 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
481 i = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
482 text = self.text
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
483 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
484 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
485 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
486 del text[i]
275
8236b972ea7d better use .startswith/.endswith instead of [0]/[-1]
Thomas Waldmann <tw@waldmann-edv.de>
parents: 258
diff changeset
487 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
488 # 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
489 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
490 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
491 # 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
492 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
493 # 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
494 del text[i]
275
8236b972ea7d better use .startswith/.endswith instead of [0]/[-1]
Thomas Waldmann <tw@waldmann-edv.de>
parents: 258
diff changeset
495 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
496 # 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
497 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
498 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
499 text[i] = " "
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
500 i += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
501 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
502 if i == 0:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
503 del text[i]
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
504 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
505 text[i] = "\n"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
506 i += 1
275
8236b972ea7d better use .startswith/.endswith instead of [0]/[-1]
Thomas Waldmann <tw@waldmann-edv.de>
parents: 258
diff changeset
507 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
508 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
509 del text[i]
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
510 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
511 text[i] = "\n"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
512 i += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
513 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
514 i += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
515
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
516 def visit_text(self, node):
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
517 self.text.append(node.data)
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
518
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
519 def visit_element(self, node):
276
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
520 name = node.localName
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
521 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
522 return
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
523 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
524 if func:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
525 func(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
526 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
527 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
528
188
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
529 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
530 for node in nodelist:
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
531 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
532 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
533
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
534 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
535 result = []
188
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
536 for node in nodelist:
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
537 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
538 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
539 else:
188
3b15ec7497bb fixed GUI editor crash on save, some cosmetical changes
Thomas Waldmann <tw@waldmann-edv.de>
parents: 151
diff changeset
540 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
541 return "".join(result)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
542
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
543 def process_page(self, node):
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
544 for i in node.childNodes:
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
545 if i.nodeType == Node.ELEMENT_NODE:
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
546 self.visit_element(i)
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
547 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
548 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
549 if txt:
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
550 self.text.append(txt)
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
551 #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
552 #elif i.nodeType == Node.COMMENT_NODE:
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
553 # self.text.append(i.data)
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
554 # 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
555
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
556 def process_br(self, node):
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
557 self.text.append(self.new_line) # without this, std multi-line text below some heading misses a whitespace
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
558 # when it gets merged to float text, like word word wordword word word
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
559
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
560 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
561 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
562 if text:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
563 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
564 hstr = "=" * depth
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
565 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
566 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
567 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
568
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
569 process_h1 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
570 process_h2 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
571 process_h3 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
572 process_h4 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
573 process_h5 = process_heading
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
574 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
575
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
576 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
577 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
578 #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
579 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
580 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
581 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
582 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
583 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
584 if class_ == "gap":
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
585 before = "\n"
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
586 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
587 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
588 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
589 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
590 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
591 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
592 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
593 if class_ == "gap":
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
594 before = "\n"
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
595 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
596 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
597 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
598 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
599 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
600 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
601 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
602 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
603 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
604 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
605
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 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
607 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
608 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
609 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
610 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
611 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
612 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
613 before, indent, markup = self._get_list_item_markup(node, 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
614 self.text.append(before+indent)
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
615 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
616 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
617 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
618 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
619 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
620 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
621 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
622 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
623 if self.depth == 0:
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
624 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
625
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
626 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
627 self.depth += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
628 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
629 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
630 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
631 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
632 before, indent, markup = self._get_list_item_markup(node, 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
633 self.text.append(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
634 self.process_list_item(i, indent)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
635 elif name in ('ol', 'ul',):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
636 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
637 elif name == 'dl':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
638 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
639 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
640 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
641 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
642 if self.depth == 0:
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
643 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
644
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
645 process_ul = process_list
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
646 process_ol = process_list
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
647
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
648 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
649 if need_indent:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
650 self.text.append(indent)
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
651 for i in nodelist:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
652 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
653 self.process_inline(i)
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
654 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
655 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
656 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
657 del nodelist[:]
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
658
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
659 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
660 found = False
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
661 need_indent = False
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
662 pending = []
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
663 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
664 name = i.localName
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
665
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
666 if name in ('p', 'pre', 'ol', 'ul', 'dl', 'table',) and pending:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
667 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
668 need_indent = True
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
669
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
670 if name == 'p':
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
671 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
672 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
673 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
674 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
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 == 'pre':
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_preformatted_item(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
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
681 elif name in ('ol', 'ul',):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
682 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
683 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
684 elif name == 'dl':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
685 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
686 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
687 elif name == 'table':
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
688 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
689 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
690 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
691 found = True
560
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
692 else:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
693 pending.append(i)
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
694
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
695 if found:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
696 need_indent = True
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
697
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
698 if pending:
b4eedd2147ff gui converter: fix processing of complex list elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 559
diff changeset
699 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
700
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
701 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
702 # 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
703 # <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
704 # <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
705 # <bq>bbbbbb
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
706 self.depth += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
707 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
708 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
709 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
710 if name == 'p':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
711 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
712 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
713 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
714 elif name == 'pre':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
715 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
716 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
717 self.process_pre(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
718 elif name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6',):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
719 self.process_heading(i)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
720 elif name in ('ol', 'ul',):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
721 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
722 elif name == 'dl':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
723 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
724 elif name == 'img':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
725 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
726 elif name == 'div':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
727 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
728 elif name == 'blockquote':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
729 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
730 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
731 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
732 elif name == 'br':
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
733 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
734 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
735 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
736 self.depth -= 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
737
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
738 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
739 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
740 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
741 return
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
742
276
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
743 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
744 if name is None:
9b21b7907167 this should fix MoinMoinBugs/GuiEditorTypeErrorWhenSaving
Thomas Waldmann <tw@waldmann-edv.de>
parents: 275
diff changeset
745 return
428
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
746
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
747 if name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6',): # headers are not allowed here (e.g. inside a ul li),
f4d09019cbb8 fixed MoinMoinBugs/ProcessInlineDontSupportUlElement, some converter code cleanup
Thomas Waldmann <tw@waldmann-edv.de>
parents: 407
diff changeset
748 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
749 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
750 return
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
751
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
752 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
753 if func:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
754 func(node)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
755 return
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
756
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
757 command_close = None
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
758 if name in ('em', 'i',):
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 in ('strong', 'b',):
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 elif name == 'u':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
763 command = "__"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
764 elif name == 'big':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
765 command = "~+"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
766 command_close = "+~"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
767 elif name == 'small':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
768 command = "~-"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
769 command_close = "-~"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
770 elif name == 'strike':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
771 command = "--("
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
772 command_close = ")--"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
773 elif name == 'sub':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
774 command = ",,"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
775 elif name == 'sup':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
776 command = "^"
258
5129ca4f97a7 converter: just ignore font elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 216
diff changeset
777 elif name == 'font':
5129ca4f97a7 converter: just ignore font elements
Thomas Waldmann <tw@waldmann-edv.de>
parents: 216
diff changeset
778 command = "" # just throw away font settings
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
779 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
780 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
781
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
782 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
783 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
784 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
785 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
786 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
787 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
788 if command_close:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
789 command = command_close
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
790 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
791
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
792 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
793 # 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
794 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
795 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
796 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
797 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
798 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
799 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
800 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
801
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
802 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
803 # 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
804 for i in node.childNodes:
854
a71bcc0f27c3 fixed MoinMoinBugs:GuiEditorDeletesNewBulletText
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 834
diff changeset
805 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
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_tt(self, node):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
808 text = self.node_list_text_only(node.childNodes).replace("\n", " ")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
809 if node.getAttribute("css") == "backtick":
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
810 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
811 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
812 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
813
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
814 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
815 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
816 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
817 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
818 class_ = "hr0"
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
819 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
820 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
821 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
822 length = 4
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
823 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
824
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
825 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
826 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
827 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
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_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
830 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
831 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
832 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
833 elif i.nodeType == Node.TEXT_NODE:
559
77e2149d7eab fix gui converter html \n processing
Thomas Waldmann <tw@waldmann-edv.de>
parents: 544
diff changeset
834 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
835
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
836 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
837 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
838 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
839
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
840 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
841 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
842 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
843 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
844 class_ = None
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
845 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
846 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
847 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
848 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
849 #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
850 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
851 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
852 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
853 pass
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
854 #print i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
855 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
856 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
857 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
858 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
859 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
860 #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
861 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
862 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
863 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
864 pass
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
865 #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
866 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
867
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
868 _alignment = {"left": "(",
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
869 "center": ":",
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
870 "right": ")",
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
871 "top": "^",
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
872 "bottom": "v"}
0
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 _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
875 try:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
876 int(value)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
877 return value + 'px'
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
878 except ValueError:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
879 return value
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
880
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
881 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
882 result = []
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
883 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
884 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
885 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
886 if match:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
887 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
888 (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
889 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
890 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
891 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
892 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
893 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
894 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
895 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
896 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
897 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
898 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
899 if node.hasAttribute("align"):
08778f685aaf begin fixing http://moinmoin.wikiwikiweb.de/MoinMoinBugs/GuiEditorDestroysTableStyles (incomplete)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 276
diff changeset
900 value = node.getAttribute("align")
08778f685aaf begin fixing http://moinmoin.wikiwikiweb.de/MoinMoinBugs/GuiEditorDestroysTableStyles (incomplete)
Thomas Waldmann <tw@waldmann-edv.de>
parents: 276
diff changeset
901 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
902 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
903 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
904 if node.hasAttribute("class"):
f6a74f85b9d7 fix tableclass attr for gui editor
Thomas Waldmann <tw@waldmann-edv.de>
parents: 488
diff changeset
905 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
906 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
907
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
908 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
909 result = []
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
910 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
911 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
912 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
913 if match:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
914 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
915 (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
916 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
917 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
918 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
919 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
920 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
921 result.append('rowstyle="%s"' % node.getAttribute("style"))
544
bdaea0dcf3b1 converter: fix table/row/cell style spaces
Thomas Waldmann <tw@waldmann-edv.de>
parents: 531
diff changeset
922 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
923
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
924 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
925 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
926 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
927 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
928 rowspan = ""
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 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
931 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
932 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
933 colspan = 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
934
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
935 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
936
544
bdaea0dcf3b1 converter: fix table/row/cell style spaces
Thomas Waldmann <tw@waldmann-edv.de>
parents: 531
diff changeset
937 align = ""
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
938 result = []
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
939 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
940 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
941 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
942 if match:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
943 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
944 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
945 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
946 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
947 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
948 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
949 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
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("valign"):
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("valign")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
955 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
956 # 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
957 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
958 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
959 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
960 if value[-1] == "%":
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
961 align += value
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
962 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
963 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
964 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
965 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
966 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
967 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
968 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
969 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
970 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
971 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
972 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
973
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
974 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
975 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
976 result.append(rowspan)
544
bdaea0dcf3b1 converter: fix table/row/cell style spaces
Thomas Waldmann <tw@waldmann-edv.de>
parents: 531
diff changeset
977 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
978
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
979 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
980 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
981 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
982 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
983 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
984 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
985 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
986 if name == 'tr':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
987 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
988 style = ""
294
3cbbedfb89af converter: handle thead and tfoot tags
Thomas Waldmann <tw@waldmann-edv.de>
parents: 277
diff changeset
989 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
990 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
991 elif name == 'caption':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
992 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
993 style = ''
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
994 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
995 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
996 #else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
997 # raise ConvertError("Unexpected node: %r" % i)
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
998 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
999
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1000 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
1001 # get first row
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 table.childNodes:
294
3cbbedfb89af converter: handle thead and tfoot tags
Thomas Waldmann <tw@waldmann-edv.de>
parents: 277
diff changeset
1003 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
1004 #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
1005 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
1006 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
1007 break
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1008 break
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1009 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
1010 break
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1011 # count columns
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1012 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
1013 colspan = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1014 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
1015 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
1016 continue
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1017 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
1018 try:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1019 colspan += int(span)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1020 except ValueError:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1021 colspan += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1022 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1023 colspan = 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1024 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
1025 if text:
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
1026 self.text.extend(["%s'''%s%s'''||" % ('||' * colspan, style, text), 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
1027
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1028 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
1029 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
1030 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
1031 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1032 colspan = 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1033 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
1034
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1035 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
1036 if style:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1037 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
1038
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1039 found = False
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1040 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
1041 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1042 if name == 'p':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1043 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
1044 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
1045 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1046 if not found:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1047 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
1048 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
1049 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
1050 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1051 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
1052 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
1053 if data:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1054 found = True
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1055 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
1056 if not found:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1057 self.text.append(" ")
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1058
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1059 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
1060 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
1061 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
1062 else:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1063 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
1064 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
1065 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
1066 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
1067 name = i.localName
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1068 if name == 'td':
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1069 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
1070 style = ""
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1071 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
1072 raise ConvertError("process_table_record: Don't support %s element" % name)
564
a7f8bfd10322 gui converter: use (soft) new_line object more, strip trailing ws
Thomas Waldmann <tw@waldmann-edv.de>
parents: 563
diff changeset
1073 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
1074
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1075 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
1076 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
1077 if scriptname == "":
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1078 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
1079 # 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
1080 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
1081 if href:
101
2202f548cbb0 use own urllib wrapper, see wikiutil
Thomas Waldmann <tw@waldmann-edv.de>
parents: 48
diff changeset
1082 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
1083 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
1084 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
1085 id = id.nodeValue
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
1086
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
1087 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
1088 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
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 node.attributes.has_key("title"):
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 = node.attributes.get("title").nodeValue
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1092 if node.attributes.has_key("class"):
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1093 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
1094
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
1095 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
1096 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
1097
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 # interwiki 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
1099 if class_ == "interwiki":
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 wikitag, wikiurl, wikitail, err = wikiutil.resolve_wiki(
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1101 self.request, title + ":")
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 not err and href.startswith(wikiurl):
833
f6e52d938ba3 gui converter: use easy markup for links with pagename = linktext
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 832
diff changeset
1103 pagename, qpagename = pagename_from_url(href[len(wikiurl):].lstrip('/'))
f6e52d938ba3 gui converter: use easy markup for links with pagename = linktext
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 832
diff changeset
1104 interwikiname = "%s:%s" % (wikitag, qpagename)
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
1105 else:
48
8a37de5a6b79 fixed broken tests package, moved ConvertError to convert module
Nir Soffer <nirs@freeshell.org>
parents: 37
diff changeset
1106 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
1107 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
1108 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
1109 href = ""
833
f6e52d938ba3 gui converter: use easy markup for links with pagename = linktext
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 832
diff changeset
1110 pagename, qpagename = pagename_from_url(href)
f6e52d938ba3 gui converter: use easy markup for links with pagename = linktext
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 832
diff changeset
1111 interwikiname = "%s:%s" % (title, qpagename)
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
1112 if interwikiname and 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
1113 self.text.append("%s" % interwikiname)
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1114 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
1115 elif title == 'Self':
832
0710dd481945 fix gui converter link conversion
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 828
diff changeset
1116 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
1117 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
1118 elif interwikiname:
eb3b18ffb28b fixed some english strings, better converter debugging msgs, move lineno anchors to formatter
Thomas Waldmann <tw@waldmann-edv.de>
parents: 21
diff changeset
1119 self.text.append("[wiki:%s %s]" % (interwikiname, 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
1120 return
999
97ce857bdebf whitespace-only cleanup and minor style changes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 878
diff changeset
1121
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
1122 # 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
1123 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
1124 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
1125 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
1126 # 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
1127
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 # 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
1129 if title and title.startswith("attachment:"):
834
f17ec1d923b3 gui converter: fix attachment links
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 833
diff changeset
1130 attname, qattname = pagename_from_url(title[len("attachment:"):])
f17ec1d923b3 gui converter: fix attachment links
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 833
diff changeset
1131 if attname != text:
f17ec1d923b3 gui converter: fix attachment links
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 833
diff changeset
1132 self.text.append('[attachment:%s %s]' % (qattname, text))
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
1133 else:
834
f17ec1d923b3 gui converter: fix attachment links
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 833
diff changeset
1134 self.text.extend([self.white_space, 'attachment:%s' % qattname, 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
1135 # 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
1136 elif href.startswith(scriptname):
826
8e880418d736 remove all underscore <-> blank magic
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 734
diff changeset
1137 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
1138 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
1139 if text == pagename:
19
6772e845059d fix for gecko paste link brokenness, src cosmetics
Thomas Waldmann <tw@waldmann-edv.de>
parents: 10
diff changeset
1140 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
1141 # relative link /SubPage
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.endswith(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
1143 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
1144 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
1145 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
1146 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
1147 # relative 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
1148 elif href.endswith(text.lstrip("..").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
1149 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
1150 # 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
1151 else:
832
0710dd481945 fix gui converter link conversion
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 828
diff changeset
1152 self.text.append('["%s" %s]' % (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
1153 # 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
1154 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
1155 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
1156 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
1157 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
1158 self.text.append("[%s %s]" % (href, 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
1159 # 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
1160 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
1161 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
1162 # 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
1163 elif text == "" and wikiutil.isPicture(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
1164 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
1165 # labeled link
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1166 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
1167 href = href.replace(" ", "%20")
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1168 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
1169 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
1170 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
1171
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1172 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
1173 src = None
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1174 if node.attributes.has_key("src"):
101
2202f548cbb0 use own urllib wrapper, see wikiutil
Thomas Waldmann <tw@waldmann-edv.de>
parents: 48
diff changeset
1175 src = wikiutil.url_unquote(node.attributes.get("src").nodeValue)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1176 title = None
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1177 if node.attributes.has_key("title"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1178 title = node.attributes.get("title").nodeValue
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1179 alt = None
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1180 if node.attributes.has_key("alt"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1181 alt = node.attributes.get("alt").nodeValue
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1182
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1183 # Attachment image
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1184 if (title and title.startswith("attachment:") and
101
2202f548cbb0 use own urllib wrapper, see wikiutil
Thomas Waldmann <tw@waldmann-edv.de>
parents: 48
diff changeset
1185 wikiutil.isPicture(wikiutil.url_unquote(title[len("attachment:"):]))):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1186 self.text.extend([self.white_space,
101
2202f548cbb0 use own urllib wrapper, see wikiutil
Thomas Waldmann <tw@waldmann-edv.de>
parents: 48
diff changeset
1187 wikiutil.url_unquote(title),
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1188 self.white_space])
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1189 # Drawing image
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1190 elif title and title.startswith("drawing:"):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1191 self.text.extend([self.white_space,
101
2202f548cbb0 use own urllib wrapper, see wikiutil
Thomas Waldmann <tw@waldmann-edv.de>
parents: 48
diff changeset
1192 wikiutil.url_unquote(title),
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1193