Changeset View
Changeset View
Standalone View
Standalone View
autotests/html/test.jsx.html
- This file was added.
1 | <!DOCTYPE html> | ||||
---|---|---|---|---|---|
2 | <html><head> | ||||
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||||
4 | <title>test.jsx</title> | ||||
5 | <meta name="generator" content="KF5::SyntaxHighlighting (JavaScript React)"/> | ||||
6 | </head><body style="color:#1f1c1b"><pre> | ||||
7 | <span style="color:#898887;">/* email: <</span><span style="color:#898887;text-decoration:underline;">willy@wmail.com</span><span style="color:#898887;">></span> | ||||
8 | <span style="color:#898887;"> * URL: </span><span style="color:#898887;text-decoration:underline;">https://reactjs.org/</span><span style="color:#898887;">*/</span> | ||||
9 | | ||||
10 | <span style="color:#ff5500;">import</span> React <span style="color:#ff5500;">from</span> <span style="color:#bf0303;">'react'</span>; | ||||
11 | <span style="color:#ff5500;">import</span> { PhotoStory, VideoStory } <span style="color:#ff5500;">from</span> <span style="color:#bf0303;">'./stories'</span>; | ||||
12 | | ||||
13 | <span style="font-weight:bold;">function</span> <span style="color:#0057ae;">Story</span>(props) { | ||||
14 | <span style="font-weight:bold;">const</span> SpecificStory = components[<span style="color:#0057ae;">props</span>.<span style="color:#0057ae;">storyType</span>]; | ||||
15 | <span style="font-weight:bold;">return </span><span style="color:#644a9b;font-weight:bold;"><SpecificStory</span> <span style="color:#006e28;">story</span>=<span style="color:#0057ae;">{</span> <span style="color:#0057ae;">props</span>.<span style="color:#0057ae;">story</span> <span style="color:#0057ae;">}</span> <span style="color:#006e28;">attr2</span>=<span style="color:#bf0303;">"</span><span style="color:#b08000;">&ref;</span><span style="color:#bf0303;">"</span> <span style="color:#006e28;">attr3</span>=<span style="color:#bf0303;">"Hello\n"</span> <span style="color:#644a9b;font-weight:bold;">/></span>; | ||||
16 | } | ||||
17 | | ||||
18 | <span style="font-weight:bold;">function</span> | ||||
19 | <span style="color:#644a9b;font-weight:bold;"><Tag</span> <span style="color:#006e28;">attr1</span>=<span style="color:#0057ae;">{ </span><span style="font-weight:bold;"><tag/></span> <span style="font-weight:bold;">function</span> <noTag/> <span style="font-weight:bold;">return</span> <span style="font-weight:bold;font-style:italic;">class</span> <span style="font-weight:bold;">var</span> <span style="color:#b08000;">0x123</span> { } &noRef; <span style="color:#0057ae;">hello</span>() <span style="color:#0057ae;">React</span>.<span style="color:#0057ae;">Component</span>() <span style="color:#0057ae;">}</span> <span style="color:#006e28;">attr2</span>=<span style="color:#bf0303;">"</span><span style="color:#b08000;">&ref;</span><span style="color:#bf0303;">"</span><span style="color:#644a9b;font-weight:bold;">></span> | ||||
20 | /* no comment*/ function <span style="font-weight:bold;"><tag/></span> return class var 0x123 <span style="color:#b08000;">&ref;</span> hello() React.Component() | ||||
21 | .<span style="font-weight:bold;"><tag/></span> anyWord <span style="font-weight:bold;"><tag/></span> | ||||
22 | <span style="color:#0057ae;">{</span> <span style="font-weight:bold;">function</span> <tag> <span style="font-weight:bold;">return</span> <span style="font-weight:bold;font-style:italic;">class</span> <span style="font-weight:bold;">var</span> <span style="color:#b08000;">0x123</span> <span style="color:#0057ae;">hello</span>() <span style="color:#0057ae;">React</span>.<span style="color:#0057ae;">Component</span>() <span style="color:#0057ae;">}</span> | ||||
23 | <span style="color:#644a9b;font-weight:bold;"></Tag></span> | ||||
24 | | ||||
25 | <span style="font-weight:bold;"><tag1></span> <span style="font-weight:bold;"></tag1></span> | ||||
26 | <span style="font-weight:bold;"><tag1></span> <span style="font-weight:bold;"></</span><span style="color:#bf0303;text-decoration:underline;">Tag$</span><span style="font-weight:bold;">></span> | ||||
27 | <span style="color:#644a9b;font-weight:bold;"><Tag$></span> <span style="color:#644a9b;font-weight:bold;"></tag></span> | ||||
28 | | ||||
29 | <span style="font-weight:bold;"><tag</span><span style="color:#898887;">/*comment*/</span><span style="color:#006e28;">attr1</span><span style="color:#898887;">/*comment*/</span>= <span style="color:#898887;">/*comment*/</span><span style="color:#bf0303;">"value"</span><span style="color:#898887;">/*comment*/</span><span style="color:#006e28;">attr2</span> <span style="color:#898887;">/*comment*/</span><span style="color:#006e28;">attr3</span>=<span style="color:#bf0303;">'a'</span> <span style="color:#006e28;">key</span><span style="color:#898887;">/*comment*/</span><span style="color:#006e28;">key2</span> <span style="font-weight:bold;">/></span> | ||||
30 | | ||||
31 | <span style="color:#898887;">// Detect Valid tags</span> | ||||
32 | | ||||
33 | <span style="color:#898887;">/* comment */</span> <span style="font-weight:bold;"><tag></tag></span> | ||||
34 | { <span style="color:#898887;">/* comment </span> | ||||
35 | <span style="color:#898887;"> */</span> <span style="color:#644a9b;font-weight:bold;"><Tag</span> <span style="color:#644a9b;font-weight:bold;">/></span> | ||||
36 | word <noTag/> . <noTag/> } <noTag/> | ||||
37 | <span style="font-weight:bold;">return </span><span style="color:#898887;">/* comment</span> | ||||
38 | <span style="color:#898887;"> multiline */</span> <span style="font-weight:bold;"><tag/></span> <span style="color:#898887;">/* comment */</span> <span style="color:#644a9b;font-weight:bold;"><Tag/></span> | ||||
39 | && <span style="color:#898887;">/*comment*/</span> <span style="color:#644a9b;font-weight:bold;"><Tag/></span> | ||||
40 | & <span style="color:#898887;">/*comment*/</span> <noTag/> | ||||
41 | | ||||
42 | <span style="font-weight:bold;"><tag/></span> | ||||
43 | { <span style="font-weight:bold;"><hello></span>Hello<span style="font-weight:bold;"></hello></span> } | ||||
44 | ?<span style="color:#644a9b;font-weight:bold;"><Tag</span> <span style="color:#644a9b;font-weight:bold;">/></span>; | ||||
45 | [ <span style="font-weight:bold;"><tag</span> <span style="font-weight:bold;">/></span> ( <span style="font-weight:bold;"><tag</span> <span style="font-weight:bold;">/></span> | ||||
46 | ,<span style="color:#644a9b;font-weight:bold;"><Tag/></span> =<span style="color:#644a9b;font-weight:bold;"><Tag/></span> | ||||
47 | &&<span style="font-weight:bold;"><tag/></span> ||<span style="font-weight:bold;"><tag/></span> | ||||
48 | <span style="font-weight:bold;">return </span><span style="font-weight:bold;"><tag/></span> ; | ||||
49 | <span style="color:#ff5500;">default</span><span style="font-weight:bold;"><tag/></span> ; | ||||
50 | <span style="color:#644a9b;font-weight:bold;"><Tag></span> <span style="font-weight:bold;"><tag></span> <span style="color:#644a9b;font-weight:bold;"><tag$/></span> <span style="font-weight:bold;"></tag></span> return <span style="color:#644a9b;font-weight:bold;"></Tag></span> | ||||
51 | | ||||
52 | anyWord<noTag> | ||||
53 | anyWord<span style="color:#898887;">/*comment*/</span> <noTag/> | ||||
54 | .<noTag> | ||||
55 | &<notag> | <noTag/> | ||||
56 | % <span style="color:#898887;">/* comment*/</span> <noTag/> | ||||
57 | </pre></body></html> |