annotate MoinMoin/converter/text_html_text_moin_wiki.py @ 3961:60b2a8ca5903

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