mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
New module to parse a simple markup language
2000-10-24 Havoc Pennington <hp@pobox.com> * gmarkup.h, gmarkup.c: New module to parse a simple markup language * Makefile.am: add gmarkup.h, gmarkup.c * tests/Makefile.am: add markup-test * gstring.h (g_string_new_len): new function to create a string with a length (g_string_new): avoid a gratuitous realloc
This commit is contained in:
committed by
Havoc Pennington
parent
7ea09e4589
commit
32ef70d4b2
0
tests/markups/fail-1.gmarkup
Normal file
0
tests/markups/fail-1.gmarkup
Normal file
2
tests/markups/fail-10.gmarkup
Normal file
2
tests/markups/fail-10.gmarkup
Normal file
@@ -0,0 +1,2 @@
|
||||
<foo>
|
||||
</|foo>
|
4
tests/markups/fail-11.gmarkup
Normal file
4
tests/markups/fail-11.gmarkup
Normal file
@@ -0,0 +1,4 @@
|
||||
<foo>
|
||||
<bar>
|
||||
</foo>
|
||||
</bar>
|
1
tests/markups/fail-12.gmarkup
Normal file
1
tests/markups/fail-12.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
</foo>
|
1
tests/markups/fail-13.gmarkup
Normal file
1
tests/markups/fail-13.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
</foo|>
|
2
tests/markups/fail-14.gmarkup
Normal file
2
tests/markups/fail-14.gmarkup
Normal file
@@ -0,0 +1,2 @@
|
||||
<foo>
|
||||
<
|
3
tests/markups/fail-15.gmarkup
Normal file
3
tests/markups/fail-15.gmarkup
Normal file
@@ -0,0 +1,3 @@
|
||||
<foo>
|
||||
<bar>
|
||||
</bar>
|
1
tests/markups/fail-16.gmarkup
Normal file
1
tests/markups/fail-16.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo/
|
1
tests/markups/fail-17.gmarkup
Normal file
1
tests/markups/fail-17.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<fo
|
1
tests/markups/fail-18.gmarkup
Normal file
1
tests/markups/fail-18.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo bar
|
1
tests/markups/fail-19.gmarkup
Normal file
1
tests/markups/fail-19.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo
|
1
tests/markups/fail-2.gmarkup
Normal file
1
tests/markups/fail-2.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD>ν語
|
1
tests/markups/fail-20.gmarkup
Normal file
1
tests/markups/fail-20.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo bar=
|
1
tests/markups/fail-21.gmarkup
Normal file
1
tests/markups/fail-21.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo bar="fdsf
|
1
tests/markups/fail-22.gmarkup
Normal file
1
tests/markups/fail-22.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo>
|
2
tests/markups/fail-23.gmarkup
Normal file
2
tests/markups/fail-23.gmarkup
Normal file
@@ -0,0 +1,2 @@
|
||||
<foo>
|
||||
<fo
|
1
tests/markups/fail-24.gmarkup
Normal file
1
tests/markups/fail-24.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<!-- dfklsjdf;kljsdf;ljk document ends here
|
1
tests/markups/fail-25.gmarkup
Normal file
1
tests/markups/fail-25.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<? document ending unexpectedly
|
1
tests/markups/fail-26.gmarkup
Normal file
1
tests/markups/fail-26.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo>&;</foo>
|
1
tests/markups/fail-27.gmarkup
Normal file
1
tests/markups/fail-27.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo>&|;</foo>
|
1
tests/markups/fail-28.gmarkup
Normal file
1
tests/markups/fail-28.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo>&am|;</foo>
|
1
tests/markups/fail-29.gmarkup
Normal file
1
tests/markups/fail-29.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo>&bar;</foo>
|
49
tests/markups/fail-3.gmarkup
Normal file
49
tests/markups/fail-3.gmarkup
Normal file
@@ -0,0 +1,49 @@
|
||||
<foobar>
|
||||
Παν語
|
||||
|
||||
This is a list of ways to say hello in various languages. Its purpose is to illustrate a number of scripts.
|
||||
|
||||
(Converted into UTF-8)
|
||||
|
||||
---------------------------------------------------------
|
||||
Arabic السلام عليكم
|
||||
Czech (česky) Dobrý den
|
||||
Danish (Dansk) Hej, Goddag
|
||||
English Hello
|
||||
Esperanto Saluton
|
||||
Estonian Tere, Tervist
|
||||
FORTRAN PROGRAM
|
||||
Finnish (Suomi) Hei
|
||||
French (Français) Bonjour, Salut
|
||||
German (Deutsch Nord) Guten Tag
|
||||
German (Deutsch Süd) Grüß Gott
|
||||
Greek (Ελληνικά) Γειά σας
|
||||
Hebrew שלום
|
||||
Hindi नमस्ते, <20><>मस्कार।
|
||||
Italiano Ciao, Buon giorno
|
||||
Maltese Ċaw, Saħħa
|
||||
Nederlands, Vlaams Hallo, Dag
|
||||
Norwegian (Norsk) Hei, God dag
|
||||
Polish Dzień dobry, Hej
|
||||
Russian (Русский) Здравствуйте!
|
||||
Slovak Dobrý deň
|
||||
Spanish (Español) ¡Hola!
|
||||
Swedish (Svenska) Hej, Goddag
|
||||
Thai (ภาษาไทย) สวัสดีครับ, สวัสดีค่ะ
|
||||
Turkish (Türkçe) Merhaba
|
||||
Vietnamese (Tiếng Việt) Xin Chào
|
||||
Yiddish (ײַדישע) דאָס הײַזעלע
|
||||
|
||||
Japanese (日本語) こんにちは, コンニチハ
|
||||
Chinese (中文,普通话,汉语) 你好
|
||||
Cantonese (粵語,廣東話) 早晨, 你好
|
||||
Korean (한글) 안녕하세요, 안녕하십니까
|
||||
|
||||
Difference among chinese characters in GB, JIS, KSC, BIG5:
|
||||
GB -- 元气 开发
|
||||
JIS -- 元気 開発
|
||||
KSC -- 元氣 開發
|
||||
BIG5 -- 元氣 開發
|
||||
|
||||
|
||||
</foobar>
|
1
tests/markups/fail-30.gmarkup
Normal file
1
tests/markups/fail-30.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo>&sdfkljsdsdfsdfsdfsdf</foo>
|
1
tests/markups/fail-31.gmarkup
Normal file
1
tests/markups/fail-31.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo>�</foo>
|
1
tests/markups/fail-32.gmarkup
Normal file
1
tests/markups/fail-32.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo></foo>
|
1
tests/markups/fail-33.gmarkup
Normal file
1
tests/markups/fail-33.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo>&#;</foo>
|
1
tests/markups/fail-34.gmarkup
Normal file
1
tests/markups/fail-34.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
<foo>𹋺</foo>
|
1
tests/markups/fail-4.gmarkup
Normal file
1
tests/markups/fail-4.gmarkup
Normal file
@@ -0,0 +1 @@
|
||||
foo
|
2
tests/markups/fail-5.gmarkup
Normal file
2
tests/markups/fail-5.gmarkup
Normal file
@@ -0,0 +1,2 @@
|
||||
<|foo>
|
||||
</|foo>
|
2
tests/markups/fail-6.gmarkup
Normal file
2
tests/markups/fail-6.gmarkup
Normal file
@@ -0,0 +1,2 @@
|
||||
<foo|>
|
||||
</foo>
|
2
tests/markups/fail-7.gmarkup
Normal file
2
tests/markups/fail-7.gmarkup
Normal file
@@ -0,0 +1,2 @@
|
||||
<foo bar}"baz">
|
||||
</foo>
|
2
tests/markups/fail-8.gmarkup
Normal file
2
tests/markups/fail-8.gmarkup
Normal file
@@ -0,0 +1,2 @@
|
||||
<foo/}>
|
||||
</foo>
|
2
tests/markups/fail-9.gmarkup
Normal file
2
tests/markups/fail-9.gmarkup
Normal file
@@ -0,0 +1,2 @@
|
||||
<foo bar={baz">
|
||||
</foo>
|
9
tests/markups/valid-1.gmarkup
Normal file
9
tests/markups/valid-1.gmarkup
Normal file
@@ -0,0 +1,9 @@
|
||||
<!-- Comment -->
|
||||
<?PI ?>
|
||||
<foobar>
|
||||
<e1>Hi & this is some text inside an element Two 'E' chars as character refs: E E and some 'J': J J</e1>
|
||||
<e2:foo> Text <childfree/> with some <nested>nested elements</nested> and entities "& < >> ' and whitespace </e2:foo>
|
||||
<tag ab="fo<o" bar="foo" baz="blah">This element has attributes</tag>
|
||||
<nochildren a="b" xyz="qrs"/>
|
||||
</foobar>
|
||||
|
49
tests/markups/valid-2.gmarkup
Normal file
49
tests/markups/valid-2.gmarkup
Normal file
@@ -0,0 +1,49 @@
|
||||
<foobar>
|
||||
Παν語
|
||||
|
||||
This is a list of ways to say hello in various languages. Its purpose is to illustrate a number of scripts.
|
||||
|
||||
(Converted into UTF-8)
|
||||
|
||||
---------------------------------------------------------
|
||||
Arabic السلام عليكم
|
||||
Czech (česky) Dobrý den
|
||||
Danish (Dansk) Hej, Goddag
|
||||
English Hello
|
||||
Esperanto Saluton
|
||||
Estonian Tere, Tervist
|
||||
FORTRAN PROGRAM
|
||||
Finnish (Suomi) Hei
|
||||
French (Français) Bonjour, Salut
|
||||
German (Deutsch Nord) Guten Tag
|
||||
German (Deutsch Süd) Grüß Gott
|
||||
Greek (Ελληνικά) Γειά σας
|
||||
Hebrew שלום
|
||||
Hindi नमस्ते, नमस्कार।
|
||||
Italiano Ciao, Buon giorno
|
||||
Maltese Ċaw, Saħħa
|
||||
Nederlands, Vlaams Hallo, Dag
|
||||
Norwegian (Norsk) Hei, God dag
|
||||
Polish Dzień dobry, Hej
|
||||
Russian (Русский) Здравствуйте!
|
||||
Slovak Dobrý deň
|
||||
Spanish (Español) ¡Hola!
|
||||
Swedish (Svenska) Hej, Goddag
|
||||
Thai (ภาษาไทย) สวัสดีครับ, สวัสดีค่ะ
|
||||
Turkish (Türkçe) Merhaba
|
||||
Vietnamese (Tiếng Việt) Xin Chào
|
||||
Yiddish (ײַדישע) דאָס הײַזעלע
|
||||
|
||||
Japanese (日本語) こんにちは, コンニチハ
|
||||
Chinese (中文,普通话,汉语) 你好
|
||||
Cantonese (粵語,廣東話) 早晨, 你好
|
||||
Korean (한글) 안녕하세요, 안녕하십니까
|
||||
|
||||
Difference among chinese characters in GB, JIS, KSC, BIG5:
|
||||
GB -- 元气 开发
|
||||
JIS -- 元気 開発
|
||||
KSC -- 元氣 開發
|
||||
BIG5 -- 元氣 開發
|
||||
|
||||
|
||||
</foobar>
|
Reference in New Issue
Block a user