• R/O
  • SSH
  • HTTPS

blogs: コミット


コミットメタ情報

リビジョン87 (tree)
日時2019-02-21 19:16:52
作者hirukawa_ryo

ログメッセージ

* flexmark-ext-text-layout-ja 削除。日本語組版の機能はcatalpaに移動しました。

変更サマリ

  • delete: flexmark-ext-text-layout-ja/tags
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/com/vladsch/flexmark/html/renderer/JapaneseTextLayoutAccessor.java
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/com/vladsch/flexmark/html/renderer
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/com/vladsch/flexmark/html
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/com/vladsch/flexmark
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/com/vladsch
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/com
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/JapaneseTextLayoutExtension.java
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/RawChars.java
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/Char.java
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/Processor.java
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/Token.java
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/JapaneseTextLayoutRenderer.java
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java/net
  • delete: flexmark-ext-text-layout-ja/trunk/src/main/java
  • delete: flexmark-ext-text-layout-ja/trunk/src/main
  • delete: flexmark-ext-text-layout-ja/trunk/src
  • delete: flexmark-ext-text-layout-ja/trunk/gradlew.bat
  • delete: flexmark-ext-text-layout-ja/trunk/build.gradle
  • delete: flexmark-ext-text-layout-ja/trunk/settings.gradle
  • delete: flexmark-ext-text-layout-ja/trunk/javadoc.css
  • delete: flexmark-ext-text-layout-ja/trunk/gradle/wrapper/gradle-wrapper.jar
  • delete: flexmark-ext-text-layout-ja/trunk/gradle/wrapper/gradle-wrapper.properties
  • delete: flexmark-ext-text-layout-ja/trunk/gradle/wrapper
  • delete: flexmark-ext-text-layout-ja/trunk/gradle
  • delete: flexmark-ext-text-layout-ja/trunk/gradlew
  • delete: flexmark-ext-text-layout-ja/trunk
  • delete: flexmark-ext-text-layout-ja/branches
  • delete: flexmark-ext-text-layout-ja

差分

--- flexmark-ext-text-layout-ja/trunk/gradlew.bat (revision 86)
+++ flexmark-ext-text-layout-ja/trunk/gradlew.bat (nonexistent)
@@ -1,84 +0,0 @@
1-@if "%DEBUG%" == "" @echo off
2-@rem ##########################################################################
3-@rem
4-@rem Gradle startup script for Windows
5-@rem
6-@rem ##########################################################################
7-
8-@rem Set local scope for the variables with windows NT shell
9-if "%OS%"=="Windows_NT" setlocal
10-
11-set DIRNAME=%~dp0
12-if "%DIRNAME%" == "" set DIRNAME=.
13-set APP_BASE_NAME=%~n0
14-set APP_HOME=%DIRNAME%
15-
16-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-set DEFAULT_JVM_OPTS=
18-
19-@rem Find java.exe
20-if defined JAVA_HOME goto findJavaFromJavaHome
21-
22-set JAVA_EXE=java.exe
23-%JAVA_EXE% -version >NUL 2>&1
24-if "%ERRORLEVEL%" == "0" goto init
25-
26-echo.
27-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28-echo.
29-echo Please set the JAVA_HOME variable in your environment to match the
30-echo location of your Java installation.
31-
32-goto fail
33-
34-:findJavaFromJavaHome
35-set JAVA_HOME=%JAVA_HOME:"=%
36-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37-
38-if exist "%JAVA_EXE%" goto init
39-
40-echo.
41-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42-echo.
43-echo Please set the JAVA_HOME variable in your environment to match the
44-echo location of your Java installation.
45-
46-goto fail
47-
48-:init
49-@rem Get command-line arguments, handling Windows variants
50-
51-if not "%OS%" == "Windows_NT" goto win9xME_args
52-
53-:win9xME_args
54-@rem Slurp the command line arguments.
55-set CMD_LINE_ARGS=
56-set _SKIP=2
57-
58-:win9xME_args_slurp
59-if "x%~1" == "x" goto execute
60-
61-set CMD_LINE_ARGS=%*
62-
63-:execute
64-@rem Setup the command line
65-
66-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67-
68-@rem Execute Gradle
69-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70-
71-:end
72-@rem End local scope for the variables with windows NT shell
73-if "%ERRORLEVEL%"=="0" goto mainEnd
74-
75-:fail
76-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77-rem the _cmd.exe /c_ return code!
78-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79-exit /b 1
80-
81-:mainEnd
82-if "%OS%"=="Windows_NT" endlocal
83-
84-:omega
--- flexmark-ext-text-layout-ja/trunk/javadoc.css (revision 86)
+++ flexmark-ext-text-layout-ja/trunk/javadoc.css (nonexistent)
@@ -1,574 +0,0 @@
1-/* Javadoc style sheet */
2-/*
3-Overall document style
4-*/
5-
6-@import url('resources/fonts/dejavu.css');
7-
8-body {
9- background-color:#ffffff;
10- color:#353833;
11- font-family:Meiryo, "メイリオ", YuGothic, "Yu Gothic", "游ゴシック", Osaka, "MS PGothic", "MS Pゴシック", sans-serif;
12- font-size:14px;
13- margin:0;
14-}
15-a:link, a:visited {
16- text-decoration:none;
17- color:#4A6782;
18-}
19-a:hover, a:focus {
20- text-decoration:none;
21- color:#bb7a2a;
22-}
23-a:active {
24- text-decoration:none;
25- color:#4A6782;
26-}
27-a[name] {
28- color:#353833;
29-}
30-a[name]:hover {
31- text-decoration:none;
32- color:#353833;
33-}
34-pre {
35- font-family:MeiryoKe_Gothic, 'MigMix 1M', "MS Gothic", monospace;
36- font-size:14px;
37-}
38-h1 {
39- font-size:20px;
40-}
41-h2 {
42- font-size:18px;
43-}
44-h3 {
45- font-size:16px;
46- font-style:italic;
47-}
48-h4 {
49- font-size:13px;
50-}
51-h5 {
52- font-size:12px;
53-}
54-h6 {
55- font-size:11px;
56-}
57-ul {
58- list-style-type:disc;
59-}
60-code, tt {
61- font-family:MeiryoKe_Gothic, 'MigMix 1M', "MS Gothic", monospace;
62- font-size:14px;
63- padding-top:4px;
64- margin-top:8px;
65- line-height:1.4em;
66-}
67-dt code {
68- font-family:MeiryoKe_Gothic, 'MigMix 1M', "MS Gothic", monospace;
69- font-size:14px;
70- padding-top:4px;
71-}
72-table tr td dt code {
73- font-family:MeiryoKe_Gothic, 'MigMix 1M', "MS Gothic", monospace;
74- font-size:14px;
75- vertical-align:top;
76- padding-top:4px;
77-}
78-sup {
79- font-size:8px;
80-}
81-/*
82-Document title and Copyright styles
83-*/
84-.clear {
85- clear:both;
86- height:0px;
87- overflow:hidden;
88-}
89-.aboutLanguage {
90- float:right;
91- padding:0px 21px;
92- font-size:11px;
93- z-index:200;
94- margin-top:-9px;
95-}
96-.legalCopy {
97- margin-left:.5em;
98-}
99-.bar a, .bar a:link, .bar a:visited, .bar a:active {
100- color:#FFFFFF;
101- text-decoration:none;
102-}
103-.bar a:hover, .bar a:focus {
104- color:#bb7a2a;
105-}
106-.tab {
107- background-color:#0066FF;
108- color:#ffffff;
109- padding:8px;
110- width:5em;
111- font-weight:bold;
112-}
113-/*
114-Navigation bar styles
115-*/
116-.bar {
117- background-color:#4D7A97;
118- color:#FFFFFF;
119- padding:.8em .5em .4em .8em;
120- height:auto;/*height:1.8em;*/
121- font-size:11px;
122- margin:0;
123-}
124-.topNav {
125- background-color:#4D7A97;
126- color:#FFFFFF;
127- float:left;
128- padding:0;
129- width:100%;
130- clear:right;
131- height:2.8em;
132- padding-top:10px;
133- overflow:hidden;
134- font-size:12px;
135-}
136-.bottomNav {
137- margin-top:10px;
138- background-color:#4D7A97;
139- color:#FFFFFF;
140- float:left;
141- padding:0;
142- width:100%;
143- clear:right;
144- height:2.8em;
145- padding-top:10px;
146- overflow:hidden;
147- font-size:12px;
148-}
149-.subNav {
150- background-color:#dee3e9;
151- float:left;
152- width:100%;
153- overflow:hidden;
154- font-size:12px;
155-}
156-.subNav div {
157- clear:left;
158- float:left;
159- padding:0 0 5px 6px;
160- text-transform:uppercase;
161-}
162-ul.navList, ul.subNavList {
163- float:left;
164- margin:0 25px 0 0;
165- padding:0;
166-}
167-ul.navList li{
168- list-style:none;
169- float:left;
170- padding: 5px 6px;
171- text-transform:uppercase;
172-}
173-ul.subNavList li{
174- list-style:none;
175- float:left;
176-}
177-.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
178- color:#FFFFFF;
179- text-decoration:none;
180- text-transform:uppercase;
181-}
182-.topNav a:hover, .bottomNav a:hover {
183- text-decoration:none;
184- color:#bb7a2a;
185- text-transform:uppercase;
186-}
187-.navBarCell1Rev {
188- background-color:#F8981D;
189- color:#253441;
190- margin: auto 5px;
191-}
192-.skipNav {
193- position:absolute;
194- top:auto;
195- left:-9999px;
196- overflow:hidden;
197-}
198-/*
199-Page header and footer styles
200-*/
201-.header, .footer {
202- clear:both;
203- margin:0 20px;
204- padding:5px 0 0 0;
205-}
206-.indexHeader {
207- margin:10px;
208- position:relative;
209-}
210-.indexHeader span{
211- margin-right:15px;
212-}
213-.indexHeader h1 {
214- font-size:13px;
215-}
216-.title {
217- color:#2c4557;
218- margin:10px 0;
219-}
220-.subTitle {
221- margin:5px 0 0 0;
222-}
223-.header ul {
224- margin:0 0 15px 0;
225- padding:0;
226-}
227-.footer ul {
228- margin:20px 0 5px 0;
229-}
230-.header ul li, .footer ul li {
231- list-style:none;
232- font-size:13px;
233-}
234-/*
235-Heading styles
236-*/
237-div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
238- background-color:#dee3e9;
239- border:1px solid #d0d9e0;
240- margin:0 0 6px -8px;
241- padding:7px 5px;
242-}
243-ul.blockList ul.blockList ul.blockList li.blockList h3 {
244- background-color:#dee3e9;
245- border:1px solid #d0d9e0;
246- margin:0 0 6px -8px;
247- padding:7px 5px;
248-}
249-ul.blockList ul.blockList li.blockList h3 {
250- padding:0;
251- margin:15px 0;
252-}
253-ul.blockList li.blockList h2 {
254- padding:0px 0 20px 0;
255-}
256-/*
257-Page layout container styles
258-*/
259-.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
260- clear:both;
261- padding:10px 20px;
262- position:relative;
263-}
264-.indexContainer {
265- margin:10px;
266- position:relative;
267- font-size:12px;
268-}
269-.indexContainer h2 {
270- font-size:13px;
271- padding:0 0 3px 0;
272-}
273-.indexContainer ul {
274- margin:0;
275- padding:0;
276-}
277-.indexContainer ul li {
278- list-style:none;
279- padding-top:2px;
280-}
281-.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
282- font-size:12px;
283- font-weight:bold;
284- margin:10px 0 0 0;
285- color:#4E4E4E;
286-}
287-.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
288- margin:5px 0 10px 0px;
289- font-size:14px;
290- font-family:MeiryoKe_Gothic, 'MigMix 1M', "MS Gothic", monospace;
291-}
292-.serializedFormContainer dl.nameValue dt {
293- margin-left:1px;
294- font-size:1.1em;
295- display:inline;
296- font-weight:bold;
297-}
298-.serializedFormContainer dl.nameValue dd {
299- margin:0 0 0 1px;
300- font-size:1.1em;
301- display:inline;
302-}
303-/*
304-List styles
305-*/
306-ul.horizontal li {
307- display:inline;
308- font-size:0.9em;
309-}
310-ul.inheritance {
311- margin:0;
312- padding:0;
313-}
314-ul.inheritance li {
315- display:inline;
316- list-style:none;
317-}
318-ul.inheritance li ul.inheritance {
319- margin-left:15px;
320- padding-left:15px;
321- padding-top:1px;
322-}
323-ul.blockList, ul.blockListLast {
324- margin:10px 0 10px 0;
325- padding:0;
326-}
327-ul.blockList li.blockList, ul.blockListLast li.blockList {
328- list-style:none;
329- margin-bottom:15px;
330- line-height:1.4;
331-}
332-ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
333- padding:0px 20px 5px 10px;
334- border:1px solid #ededed;
335- background-color:#f8f8f8;
336-}
337-ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
338- padding:0 0 5px 8px;
339- background-color:#ffffff;
340- border:none;
341-}
342-ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
343- margin-left:0;
344- padding-left:0;
345- padding-bottom:15px;
346- border:none;
347-}
348-ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
349- list-style:none;
350- border-bottom:none;
351- padding-bottom:0;
352-}
353-table tr td dl, table tr td dl dt, table tr td dl dd {
354- margin-top:0;
355- margin-bottom:1px;
356-}
357-/*
358-Table styles
359-*/
360-.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
361- width:100%;
362- border-left:1px solid #EEE;
363- border-right:1px solid #EEE;
364- border-bottom:1px solid #EEE;
365-}
366-.overviewSummary, .memberSummary {
367- padding:0px;
368-}
369-.overviewSummary caption, .memberSummary caption, .typeSummary caption,
370-.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
371- position:relative;
372- text-align:left;
373- background-repeat:no-repeat;
374- color:#253441;
375- font-weight:bold;
376- clear:none;
377- overflow:hidden;
378- padding:0px;
379- padding-top:10px;
380- padding-left:1px;
381- margin:0px;
382- white-space:pre;
383-}
384-.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
385-.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
386-.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
387-.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
388-.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
389-.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
390-.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
391-.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
392- color:#FFFFFF;
393-}
394-.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
395-.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
396- white-space:nowrap;
397- padding-top:5px;
398- padding-left:12px;
399- padding-right:12px;
400- padding-bottom:7px;
401- display:inline-block;
402- float:left;
403- background-color:#F8981D;
404- border: none;
405- height:16px;
406-}
407-.memberSummary caption span.activeTableTab span {
408- white-space:nowrap;
409- padding-top:5px;
410- padding-left:12px;
411- padding-right:12px;
412- margin-right:3px;
413- display:inline-block;
414- float:left;
415- background-color:#F8981D;
416- height:16px;
417-}
418-.memberSummary caption span.tableTab span {
419- white-space:nowrap;
420- padding-top:5px;
421- padding-left:12px;
422- padding-right:12px;
423- margin-right:3px;
424- display:inline-block;
425- float:left;
426- background-color:#4D7A97;
427- height:16px;
428-}
429-.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
430- padding-top:0px;
431- padding-left:0px;
432- padding-right:0px;
433- background-image:none;
434- float:none;
435- display:inline;
436-}
437-.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
438-.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
439- display:none;
440- width:5px;
441- position:relative;
442- float:left;
443- background-color:#F8981D;
444-}
445-.memberSummary .activeTableTab .tabEnd {
446- display:none;
447- width:5px;
448- margin-right:3px;
449- position:relative;
450- float:left;
451- background-color:#F8981D;
452-}
453-.memberSummary .tableTab .tabEnd {
454- display:none;
455- width:5px;
456- margin-right:3px;
457- position:relative;
458- background-color:#4D7A97;
459- float:left;
460-
461-}
462-.overviewSummary td, .memberSummary td, .typeSummary td,
463-.useSummary td, .constantsSummary td, .deprecatedSummary td {
464- text-align:left;
465- padding:0px 0px 12px 10px;
466-}
467-th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
468-td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
469- vertical-align:top;
470- padding-right:0px;
471- padding-top:8px;
472- padding-bottom:3px;
473-}
474-th.colFirst, th.colLast, th.colOne, .constantsSummary th {
475- background:#dee3e9;
476- text-align:left;
477- padding:8px 3px 3px 7px;
478-}
479-td.colFirst, th.colFirst {
480- white-space:nowrap;
481- font-size:13px;
482-}
483-td.colLast, th.colLast {
484- font-size:13px;
485-}
486-td.colOne, th.colOne {
487- font-size:13px;
488-}
489-.overviewSummary td.colFirst, .overviewSummary th.colFirst,
490-.useSummary td.colFirst, .useSummary th.colFirst,
491-.overviewSummary td.colOne, .overviewSummary th.colOne,
492-.memberSummary td.colFirst, .memberSummary th.colFirst,
493-.memberSummary td.colOne, .memberSummary th.colOne,
494-.typeSummary td.colFirst{
495- width:25%;
496- vertical-align:top;
497-}
498-td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
499- font-weight:bold;
500-}
501-.tableSubHeadingColor {
502- background-color:#EEEEFF;
503-}
504-.altColor {
505- background-color:#FFFFFF;
506-}
507-.rowColor {
508- background-color:#EEEEEF;
509-}
510-/*
511-Content styles
512-*/
513-.description pre {
514- margin-top:0;
515-}
516-.deprecatedContent {
517- margin:0;
518- padding:10px 0;
519-}
520-.docSummary {
521- padding:0;
522-}
523-
524-ul.blockList ul.blockList ul.blockList li.blockList h3 {
525- font-style:normal;
526-}
527-
528-div.block {
529- font-size:14px;
530- font-family:Meiryo, "メイリオ", YuGothic, "Yu Gothic", "游ゴシック", Osaka, "MS PGothic", "MS Pゴシック", sans-serif;
531-}
532-
533-td.colLast div {
534- padding-top:0px;
535-}
536-
537-
538-td.colLast a {
539- padding-bottom:3px;
540-}
541-/*
542-Formatting effect styles
543-*/
544-.sourceLineNo {
545- color:green;
546- padding:0 30px 0 0;
547-}
548-h1.hidden {
549- visibility:hidden;
550- overflow:hidden;
551- font-size:10px;
552-}
553-.block {
554- display:block;
555- margin:3px 10px 2px 0px;
556- color:#474747;
557-}
558-.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
559-.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
560-.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
561- font-weight:bold;
562-}
563-.deprecationComment, .emphasizedPhrase, .interfaceName {
564- font-style:italic;
565-}
566-
567-div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
568-div.block div.block span.interfaceName {
569- font-style:normal;
570-}
571-
572-div.contentContainer ul.blockList li.blockList h2{
573- padding-bottom:0px;
574-}
--- flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/JapaneseTextLayoutExtension.java (revision 86)
+++ flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/JapaneseTextLayoutExtension.java (nonexistent)
@@ -1,33 +0,0 @@
1-package net.osdn.blogs.flexmark.ext.text_layout_ja;
2-
3-import com.vladsch.flexmark.Extension;
4-import com.vladsch.flexmark.html.HtmlRenderer;
5-import com.vladsch.flexmark.html.HtmlRenderer.Builder;
6-import com.vladsch.flexmark.html.renderer.NodeRenderer;
7-import com.vladsch.flexmark.html.renderer.NodeRendererFactory;
8-import com.vladsch.flexmark.util.options.DataHolder;
9-import com.vladsch.flexmark.util.options.MutableDataHolder;
10-
11-public class JapaneseTextLayoutExtension implements HtmlRenderer.HtmlRendererExtension {
12-
13- private JapaneseTextLayoutExtension() {
14- }
15-
16- public static Extension create() {
17- return new JapaneseTextLayoutExtension();
18- }
19-
20- @Override
21- public void rendererOptions(MutableDataHolder options) {
22- }
23-
24- @Override
25- public void extend(Builder rendererBuilder, String rendererType) {
26- rendererBuilder.nodeRendererFactory(new NodeRendererFactory() {
27- @Override
28- public NodeRenderer create(DataHolder options) {
29- return new JapaneseTextLayoutRenderer(options);
30- }
31- });
32- }
33-}
--- flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/Char.java (revision 86)
+++ flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/Char.java (nonexistent)
@@ -1,196 +0,0 @@
1-package net.osdn.blogs.flexmark.ext.text_layout_ja.core;
2-
3-public class Char implements Token {
4-
5- public enum CharClass {
6- EMPTY,
7- CRLF,
8- CR,
9- LF,
10- WHITESPACE,
11- LATIN,
12- OPENING_BRACKET,
13- CLOSING_BRACKET,
14- HYPHEN,
15- DIVIDING_PUNCTUATION_MARK,
16- MIDDLE_DOT,
17- FULL_STOP,
18- COMMA,
19- INSEPARABLE_CHARACTER,
20- JAPANESE
21- }
22-
23- private static final String OPENING_BRACKETS = "“‘(〔[{〈《「『【";
24- private static final String CLOSING_BRACKETS = "”’)〕]}〉》」』】";
25- private static final String HYPHENS = "‐―〜";
26- private static final String DIVIDING_PUNCTUATION_MARKS = "!?";
27- private static final String MIDDLE_DOTS = "・:;";
28- private static final String FULL_STOPS = "。.";
29- private static final String COMMAS = "、,";
30- private static final String INSEPARABLE_CHARACTERS = "―…‥";
31-
32- private char value;
33- private CharClass characterClass;
34- private boolean isLatin;
35- private boolean isWhitespace;
36-
37- private Char previousChar;
38- private Char nextChar;
39-
40- private double letterSpacing = 0.0;
41- private double marginLeft = 0.0;
42- private double marginRight = 0.0;
43-
44- /* create CR+LF */
45- public Char() {
46- characterClass = CharClass.CRLF;
47- isLatin = true;
48- isWhitespace = true;
49- }
50-
51- public Char(char value) {
52- this.value = value;
53-
54- if(value == 0) {
55- characterClass = CharClass.EMPTY;
56- } else if(value == 0x0D) {
57- characterClass = CharClass.CR;
58- isLatin = true;
59- isWhitespace = true;
60- } else if(value == 0x0A) {
61- characterClass = CharClass.LF;
62- isLatin = true;
63- isWhitespace = true;
64- } else if(value <= 255) {
65- characterClass = CharClass.LATIN;
66- isLatin = true;
67- if(Character.isWhitespace(value)) {
68- characterClass = CharClass.WHITESPACE;
69- isWhitespace = true;
70- }
71- } else if(OPENING_BRACKETS.indexOf(value) != -1) {
72- characterClass = CharClass.OPENING_BRACKET;
73- marginLeft = -0.5;
74- } else if(CLOSING_BRACKETS.indexOf(value) != -1) {
75- characterClass = CharClass.CLOSING_BRACKET;
76- marginRight = -0.5;
77- } else if(HYPHENS.indexOf(value) != -1) {
78- characterClass = CharClass.HYPHEN;
79- } else if(DIVIDING_PUNCTUATION_MARKS.indexOf(value) != -1) {
80- characterClass = CharClass.DIVIDING_PUNCTUATION_MARK;
81- } else if(MIDDLE_DOTS.indexOf(value) != -1) {
82- characterClass = CharClass.MIDDLE_DOT;
83- marginLeft = -0.25;
84- marginRight = -0.25;
85- } else if(FULL_STOPS.indexOf(value) != -1) {
86- characterClass = CharClass.FULL_STOP;
87- marginRight = -0.5;
88- } else if(COMMAS.indexOf(value) != -1) {
89- characterClass = CharClass.COMMA;
90- marginRight = -0.5;
91- } else if(INSEPARABLE_CHARACTERS.indexOf(value) != -1) {
92- characterClass = CharClass.INSEPARABLE_CHARACTER;
93- } else if(Character.isWhitespace(value)) {
94- characterClass = CharClass.WHITESPACE;
95- isWhitespace = true;
96- } else {
97- characterClass = CharClass.JAPANESE;
98- }
99- }
100-
101- public char getValue() {
102- return value;
103- }
104-
105- public CharClass getCharClass() {
106- return characterClass;
107- }
108-
109- public boolean isLatin() {
110- return isLatin;
111- }
112-
113- public boolean isNewLine() {
114- return (characterClass == CharClass.CRLF)
115- || (characterClass == CharClass.CR)
116- || (characterClass == CharClass.LF);
117- }
118-
119- public boolean isCRLF() {
120- return (characterClass == CharClass.CRLF);
121- }
122-
123- public boolean isCR() {
124- return (characterClass == CharClass.CR);
125- }
126-
127- public boolean isLF() {
128- return (characterClass == CharClass.LF);
129- }
130-
131- public boolean isWhitespace() {
132- return isWhitespace;
133- }
134-
135- protected void setPreviousChar(Char previousChar) {
136- this.previousChar = previousChar;
137- }
138-
139- public Char getPreviousChar() {
140- return previousChar;
141- }
142-
143- protected void setNextChar(Char nextChar) {
144- this.nextChar = nextChar;
145- }
146-
147- public Char getNextChar() {
148- return nextChar;
149- }
150-
151- protected void setLetterSpacing(double space) {
152- letterSpacing = space;
153- }
154-
155- @Override
156- public String getHtml() {
157- if(characterClass == CharClass.EMPTY) {
158- return "";
159- } else if(characterClass == CharClass.CRLF) {
160- return "\r\n";
161- } else if(marginLeft == 0.0 && marginRight == 0.0 && letterSpacing == 0.0) {
162- return String.valueOf(value);
163- } else {
164- StringBuilder sb = new StringBuilder();
165- if(marginLeft == 0.0 && marginRight == 0.0) {
166- sb.append(value);
167- } else {
168- sb.append("<span style=\"");
169- if(marginLeft != 0.0) {
170- sb.append(String.format("margin-left:%.2fem;", marginLeft));
171- }
172- if(marginRight != 0.0) {
173- sb.append(String.format("margin-right:%.2fem;", marginRight));
174- }
175- sb.append("\">");
176- sb.append(value);
177- sb.append("</span>");
178- }
179- if(letterSpacing != 0.0) {
180- sb.append(String.format("<span style=\"font-family:monospace;margin-right:%.2fem;\"> </span>", (letterSpacing - 0.5)));
181- }
182- return sb.toString();
183- }
184- }
185-
186- @Override
187- public String toString() {
188- if(characterClass == CharClass.EMPTY) {
189- return "";
190- } else if(characterClass == CharClass.CRLF) {
191- return "\r\n";
192- } else {
193- return String.valueOf(value);
194- }
195- }
196-}
--- flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/Processor.java (revision 86)
+++ flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/Processor.java (nonexistent)
@@ -1,606 +0,0 @@
1-package net.osdn.blogs.flexmark.ext.text_layout_ja.core;
2-
3-import java.util.Arrays;
4-import java.util.HashSet;
5-import java.util.Iterator;
6-import java.util.LinkedList;
7-import java.util.List;
8-import java.util.Set;
9-import java.util.regex.Matcher;
10-import java.util.regex.Pattern;
11-
12-public class Processor {
13- // https://www.w3schools.com/tags/
14- // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
15-
16- //private static final Pattern HTML_TAG_PATTERN = Pattern.compile("<(\"[^\"]*\"|'[^']*'|[^'\">])*>");
17- private static final Pattern HTML_TAG_PATTERN = Pattern.compile("<(/?\\w+|!--|!DOCTYPE)(\"[^\"]*\"|'[^']*'|[^'\">])*>", Pattern.CASE_INSENSITIVE);
18- private static final Set<String> HTML_TAGS = new HashSet<String>(Arrays.asList(
19- "!--", "!DOCTYPE",
20- "A", "ABBR", "ACRONYM", "ADDRESS", "APPLET", "AREA", "ARTICLE", "ASIDE", "AUDIO",
21- "B", "BASE", "BASEFONT", "BDI", "BDO", "BIG", "BLOCKQUOTE", "BODY", "BR", "BUTTON",
22- "CANVAS", "CAPTION", "CENTER", "CITE", "CODE", "COL", "COLGROUP",
23- "DATA", "DATALIST", "DD", "DEL", "DETAILS", "DFN", "DIALOG", "DIR", "DIV", "DL", "DT",
24- "EM", "EMBED",
25- "FIELDSET", "FIGCAPTION", "FIGURE", "FONT", "FOOTER", "FORM", "FRAME", "FRAMESET",
26- "H1", "H2", "H3", "H4", "H5", "H6", "HEAD", "HEADER", "HR", "HTML",
27- "I", "IFRAME", "IMG", "INPUT", "INS",
28- "KBD", "LABEL", "LEGEND",
29- "LI", "LINK",
30- "MAIN", "MAP", "MARK", "META", "METER",
31- "NAV", "NOFRAMES", "NOSCRIPT",
32- "OBJECT", "OL", "OPTGROUP", "OPTION", "OUTPUT",
33- "P", "PARAM", "PICTURE", "PRE", "PROGRESS",
34- "Q",
35- "RP", "RT", "RUBY",
36- "S", "SAMP", "SCRIPT", "SECTION", "SELECT", "SMALL", "SOURCE", "SPAN", "STRIKE", "STRONG", "STYLE", "SUB", "SUMMARY", "SUP", "SVG",
37- "TABLE", "TBODY", "TD", "TEMPLATE", "TEXTAREA", "TFOOT", "TH", "THEAD", "TIME", "TITLE", "TR", "TRACK", "TT",
38- "U", "UL",
39- "VAR", "VIDEO",
40- "WBR"));
41-
42- private static final Set<String> ELEMENTS_TO_SKIP = new HashSet<String>(Arrays.asList(
43- "CODE", "KBD", "TT", "PRE", "SCRIPT", "STYLE"));
44-
45- private static final Set<String> INLINE_TEXT_TAGS = new HashSet<String>(Arrays.asList(
46- "A", "EM", "I", "SMALL", "SPAN", "STRONG"));
47-
48- public static String layout(CharSequence input) {
49- List<Token> tokens = tokenize(input);
50- removeSpaces(tokens);
51- addLetterSpacing(getFirstChar(tokens));
52-
53- StringBuilder sb = new StringBuilder();
54- for(Token token : tokens) {
55- sb.append(token.getHtml());
56- }
57- return sb.toString();
58- }
59-
60- private static List<Token> tokenize(CharSequence input) {
61- List<Token> tokens = new LinkedList<Token>();
62- Char previousChar = null;
63- Char currentChar = null;
64- String upperCaseInput = input.toString().toUpperCase();
65-
66- Matcher m = HTML_TAG_PATTERN.matcher(input);
67- int index = 0;
68- while(m.find(index)) {
69- boolean isEndTag = false;
70- String tagName = m.group(1).toUpperCase();
71- if(tagName.charAt(0) == '/') {
72- tagName = tagName.substring(1);
73- isEndTag = true;
74- }
75- if(HTML_TAGS.contains(tagName)) {
76- // ADD CHARS BEFORE TAG
77- for(int i = index; i < m.start(); i++) {
78- previousChar = currentChar;
79- if(input.charAt(i) == 0x0D && (i+1 < m.start()) && input.charAt(i+1) == 0x0A) {
80- currentChar = new Char();
81- i++;
82- } else {
83- currentChar = new Char(input.charAt(i));
84- }
85- if(previousChar != null) {
86- previousChar.setNextChar(currentChar);
87- currentChar.setPreviousChar(previousChar);
88- }
89- tokens.add(currentChar);
90- }
91-
92- if(!isEndTag && ELEMENTS_TO_SKIP.contains(tagName)) {
93- // ADD EMPTY CHAR
94- previousChar = currentChar;
95- currentChar = new Char((char)0);
96- if(previousChar != null) {
97- previousChar.setNextChar(currentChar);
98- currentChar.setPreviousChar(previousChar);
99- }
100- tokens.add(currentChar);
101-
102- int end = upperCaseInput.indexOf("/" + tagName, m.end());
103- if(end != -1) {
104- // ADD CURRENT ELEMENT (START TAG - END TAG)
105- end += ("/" + tagName).length() + 1;
106- tokens.add(new RawChars(input.subSequence(m.start(), end)));
107- index = end;
108- } else {
109- // ADD CURRENT TAG
110- tokens.add(new RawChars(m.group(0)));
111- index = m.end();
112- }
113- } else if(INLINE_TEXT_TAGS.contains(tagName)) {
114- // ADD CURRENT TAG
115- tokens.add(new RawChars(m.group(0)));
116- index = m.end();
117- } else {
118- // ADD EMPTY CHAR
119- previousChar = currentChar;
120- currentChar = new Char((char)0);
121- if(previousChar != null) {
122- previousChar.setNextChar(currentChar);
123- currentChar.setPreviousChar(previousChar);
124- }
125- tokens.add(currentChar);
126-
127- // ADD CURRENT TAG
128- tokens.add(new RawChars(m.group(0)));
129- index = m.end();
130- }
131- } else {
132- // ADD CHAR '<'
133- previousChar = currentChar;
134- currentChar = new Char('<');
135- if(previousChar != null) {
136- previousChar.setNextChar(currentChar);
137- currentChar.setPreviousChar(previousChar);
138- }
139- tokens.add(currentChar);
140- index++;
141- }
142- }
143- // ADD CHARS AFTER LAST TAG
144- for(int i = index; i < input.length(); i++) {
145- previousChar = currentChar;
146- if(input.charAt(i) == 0x0D && (i+1 < input.length()) && input.charAt(i+1) == 0x0A) {
147- currentChar = new Char();
148- i++;
149- } else {
150- currentChar = new Char(input.charAt(i));
151- }
152- if(previousChar != null) {
153- previousChar.setNextChar(currentChar);
154- currentChar.setPreviousChar(previousChar);
155- }
156- tokens.add(currentChar);
157- }
158-
159- return tokens;
160- }
161-
162- private static Char getFirstChar(List<Token> tokens) {
163- for(Token token : tokens) {
164- if(token instanceof Char) {
165- return (Char)token;
166- }
167- }
168- return null;
169- }
170-
171- private static void removeSpaces(List<Token> tokens) {
172- Iterator<Token> iterator = tokens.iterator();
173- while(iterator.hasNext()) {
174- Token token = iterator.next();
175- if(token instanceof Char) {
176- Char currentChar = (Char)token;
177- if(currentChar.isLatin() && currentChar.isWhitespace()) {
178- Char previousChar = currentChar.getPreviousChar();
179- if(previousChar == null || previousChar.isWhitespace()) {
180- continue;
181- }
182- Char nextChar = currentChar.getNextChar();
183- if(nextChar == null || nextChar.isWhitespace()) {
184- continue;
185- }
186- if(previousChar.isLatin() != nextChar.isLatin()) {
187- iterator.remove();
188- previousChar.setNextChar(nextChar);
189- nextChar.setPreviousChar(previousChar);
190- } else if(currentChar.isNewLine() && !previousChar.isLatin() && !nextChar.isLatin()) {
191- iterator.remove();
192- previousChar.setNextChar(nextChar);
193- nextChar.setPreviousChar(previousChar);
194- }
195- }
196- }
197- }
198- }
199-
200- private static void addLetterSpacing(Char firstChar) {
201- Char currentChar = firstChar;
202- while(currentChar != null) {
203- Char nextChar = currentChar.getNextChar();
204- if(nextChar == null) {
205- break;
206- }
207- switch(currentChar.getCharClass()) {
208- case EMPTY:
209- break;
210- case CRLF:
211- break;
212- case CR:
213- break;
214- case LF:
215- break;
216- case WHITESPACE:
217- break;
218- case OPENING_BRACKET:
219- switch(nextChar.getCharClass()) {
220- case EMPTY:
221- break;
222- case CRLF:
223- break;
224- case CR:
225- break;
226- case LF:
227- break;
228- case WHITESPACE:
229- break;
230- case OPENING_BRACKET:
231- break;
232- case CLOSING_BRACKET:
233- break;
234- case HYPHEN:
235- break;
236- case DIVIDING_PUNCTUATION_MARK:
237- break;
238- case MIDDLE_DOT:
239- currentChar.setLetterSpacing(0.25);
240- break;
241- case FULL_STOP:
242- break;
243- case COMMA:
244- break;
245- case INSEPARABLE_CHARACTER:
246- break;
247- case JAPANESE:
248- break;
249- case LATIN:
250- break;
251- }
252- break;
253- case CLOSING_BRACKET:
254- switch(nextChar.getCharClass()) {
255- case EMPTY:
256- break;
257- case CRLF:
258- break;
259- case CR:
260- break;
261- case LF:
262- break;
263- case WHITESPACE:
264- break;
265- case OPENING_BRACKET:
266- currentChar.setLetterSpacing(0.5);
267- break;
268- case CLOSING_BRACKET:
269- break;
270- case HYPHEN:
271- currentChar.setLetterSpacing(0.5);
272- break;
273- case DIVIDING_PUNCTUATION_MARK:
274- currentChar.setLetterSpacing(0.5);
275- break;
276- case MIDDLE_DOT:
277- currentChar.setLetterSpacing(0.25);
278- break;
279- case FULL_STOP:
280- break;
281- case COMMA:
282- break;
283- case INSEPARABLE_CHARACTER:
284- currentChar.setLetterSpacing(0.5);
285- break;
286- case JAPANESE:
287- currentChar.setLetterSpacing(0.5);
288- break;
289- case LATIN:
290- currentChar.setLetterSpacing(0.5);
291- break;
292- }
293- break;
294- case HYPHEN:
295- switch(nextChar.getCharClass()) {
296- case EMPTY:
297- break;
298- case CRLF:
299- break;
300- case CR:
301- break;
302- case LF:
303- break;
304- case WHITESPACE:
305- break;
306- case OPENING_BRACKET:
307- currentChar.setLetterSpacing(0.5);
308- break;
309- case CLOSING_BRACKET:
310- break;
311- case HYPHEN:
312- break;
313- case DIVIDING_PUNCTUATION_MARK:
314- break;
315- case MIDDLE_DOT:
316- currentChar.setLetterSpacing(0.25);
317- break;
318- case FULL_STOP:
319- break;
320- case COMMA:
321- break;
322- case INSEPARABLE_CHARACTER:
323- break;
324- case JAPANESE:
325- break;
326- case LATIN:
327- break;
328- }
329- break;
330- case DIVIDING_PUNCTUATION_MARK:
331- switch(nextChar.getCharClass()) {
332- case EMPTY:
333- break;
334- case CRLF:
335- break;
336- case CR:
337- break;
338- case LF:
339- break;
340- case WHITESPACE:
341- break;
342- case OPENING_BRACKET:
343- currentChar.setLetterSpacing(0.5);
344- break;
345- case CLOSING_BRACKET:
346- break;
347- case HYPHEN:
348- break;
349- case DIVIDING_PUNCTUATION_MARK:
350- break;
351- case MIDDLE_DOT:
352- currentChar.setLetterSpacing(0.25);
353- break;
354- case FULL_STOP:
355- break;
356- case COMMA:
357- break;
358- case INSEPARABLE_CHARACTER:
359- break;
360- case JAPANESE:
361- break;
362- case LATIN:
363- break;
364- }
365- break;
366- case MIDDLE_DOT:
367- switch(nextChar.getCharClass()) {
368- case EMPTY:
369- break;
370- case CRLF:
371- break;
372- case CR:
373- break;
374- case LF:
375- break;
376- case WHITESPACE:
377- break;
378- case OPENING_BRACKET:
379- currentChar.setLetterSpacing(0.25);
380- break;
381- case CLOSING_BRACKET:
382- currentChar.setLetterSpacing(0.25);
383- break;
384- case HYPHEN:
385- currentChar.setLetterSpacing(0.25);
386- break;
387- case DIVIDING_PUNCTUATION_MARK:
388- currentChar.setLetterSpacing(0.25);
389- break;
390- case MIDDLE_DOT:
391- currentChar.setLetterSpacing(0.5);
392- break;
393- case FULL_STOP:
394- currentChar.setLetterSpacing(0.25);
395- break;
396- case COMMA:
397- currentChar.setLetterSpacing(0.25);
398- break;
399- case INSEPARABLE_CHARACTER:
400- currentChar.setLetterSpacing(0.25);
401- break;
402- case JAPANESE:
403- currentChar.setLetterSpacing(0.25);
404- break;
405- case LATIN:
406- currentChar.setLetterSpacing(0.25);
407- break;
408- }
409- break;
410- case FULL_STOP:
411- switch(nextChar.getCharClass()) {
412- case EMPTY:
413- break;
414- case CRLF:
415- break;
416- case CR:
417- break;
418- case LF:
419- break;
420- case WHITESPACE:
421- break;
422- case OPENING_BRACKET:
423- currentChar.setLetterSpacing(0.5);
424- break;
425- case CLOSING_BRACKET:
426- break;
427- case HYPHEN:
428- currentChar.setLetterSpacing(0.5);
429- break;
430- case DIVIDING_PUNCTUATION_MARK:
431- currentChar.setLetterSpacing(0.5);
432- break;
433- case MIDDLE_DOT:
434- currentChar.setLetterSpacing(0.25);
435- break;
436- case FULL_STOP:
437- break;
438- case COMMA:
439- break;
440- case INSEPARABLE_CHARACTER:
441- currentChar.setLetterSpacing(0.5);
442- break;
443- case JAPANESE:
444- currentChar.setLetterSpacing(0.5);
445- break;
446- case LATIN:
447- currentChar.setLetterSpacing(0.5);
448- break;
449- }
450- break;
451- case COMMA:
452- switch(nextChar.getCharClass()) {
453- case EMPTY:
454- break;
455- case CRLF:
456- break;
457- case CR:
458- break;
459- case LF:
460- break;
461- case WHITESPACE:
462- break;
463- case OPENING_BRACKET:
464- currentChar.setLetterSpacing(0.5);
465- break;
466- case CLOSING_BRACKET:
467- break;
468- case HYPHEN:
469- currentChar.setLetterSpacing(0.5);
470- break;
471- case DIVIDING_PUNCTUATION_MARK:
472- currentChar.setLetterSpacing(0.5);
473- break;
474- case MIDDLE_DOT:
475- currentChar.setLetterSpacing(0.25);
476- break;
477- case FULL_STOP:
478- break;
479- case COMMA:
480- break;
481- case INSEPARABLE_CHARACTER:
482- currentChar.setLetterSpacing(0.5);
483- break;
484- case JAPANESE:
485- currentChar.setLetterSpacing(0.5);
486- break;
487- case LATIN:
488- currentChar.setLetterSpacing(0.5);
489- break;
490- }
491- break;
492- case INSEPARABLE_CHARACTER:
493- switch(nextChar.getCharClass()) {
494- case EMPTY:
495- break;
496- case CRLF:
497- break;
498- case CR:
499- break;
500- case LF:
501- break;
502- case WHITESPACE:
503- break;
504- case OPENING_BRACKET:
505- currentChar.setLetterSpacing(0.5);
506- break;
507- case CLOSING_BRACKET:
508- break;
509- case HYPHEN:
510- break;
511- case DIVIDING_PUNCTUATION_MARK:
512- break;
513- case MIDDLE_DOT:
514- currentChar.setLetterSpacing(0.25);
515- break;
516- case FULL_STOP:
517- break;
518- case COMMA:
519- break;
520- case INSEPARABLE_CHARACTER:
521- break;
522- case JAPANESE:
523- break;
524- case LATIN:
525- break;
526- }
527- break;
528- case JAPANESE:
529- switch(nextChar.getCharClass()) {
530- case EMPTY:
531- break;
532- case CRLF:
533- break;
534- case CR:
535- break;
536- case LF:
537- break;
538- case WHITESPACE:
539- break;
540- case OPENING_BRACKET:
541- currentChar.setLetterSpacing(0.5);
542- break;
543- case CLOSING_BRACKET:
544- break;
545- case HYPHEN:
546- break;
547- case DIVIDING_PUNCTUATION_MARK:
548- break;
549- case MIDDLE_DOT:
550- currentChar.setLetterSpacing(0.25);
551- break;
552- case FULL_STOP:
553- break;
554- case COMMA:
555- break;
556- case INSEPARABLE_CHARACTER:
557- break;
558- case JAPANESE:
559- break;
560- case LATIN:
561- currentChar.setLetterSpacing(0.25);
562- break;
563- }
564- break;
565- case LATIN:
566- switch(nextChar.getCharClass()) {
567- case EMPTY:
568- break;
569- case CRLF:
570- break;
571- case CR:
572- break;
573- case LF:
574- break;
575- case WHITESPACE:
576- break;
577- case OPENING_BRACKET:
578- currentChar.setLetterSpacing(0.5);
579- break;
580- case CLOSING_BRACKET:
581- break;
582- case HYPHEN:
583- break;
584- case DIVIDING_PUNCTUATION_MARK:
585- break;
586- case MIDDLE_DOT:
587- currentChar.setLetterSpacing(0.25);
588- break;
589- case FULL_STOP:
590- break;
591- case COMMA:
592- break;
593- case INSEPARABLE_CHARACTER:
594- break;
595- case JAPANESE:
596- currentChar.setLetterSpacing(0.25);
597- break;
598- case LATIN:
599- break;
600- }
601- break;
602- }
603- currentChar = nextChar;
604- }
605- }
606-}
--- flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/Token.java (revision 86)
+++ flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/Token.java (nonexistent)
@@ -1,7 +0,0 @@
1-package net.osdn.blogs.flexmark.ext.text_layout_ja.core;
2-
3-public interface Token {
4-
5- String getHtml();
6-
7-}
--- flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/RawChars.java (revision 86)
+++ flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/core/RawChars.java (nonexistent)
@@ -1,20 +0,0 @@
1-package net.osdn.blogs.flexmark.ext.text_layout_ja.core;
2-
3-public class RawChars implements Token {
4-
5- private String value;
6-
7- public RawChars(CharSequence value) {
8- this.value = value.toString();
9- }
10-
11- @Override
12- public String getHtml() {
13- return value;
14- }
15-
16- @Override
17- public String toString() {
18- return value;
19- }
20-}
--- flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/JapaneseTextLayoutRenderer.java (revision 86)
+++ flexmark-ext-text-layout-ja/trunk/src/main/java/net/osdn/blogs/flexmark/ext/text_layout_ja/JapaneseTextLayoutRenderer.java (nonexistent)
@@ -1,77 +0,0 @@
1-package net.osdn.blogs.flexmark.ext.text_layout_ja;
2-
3-import java.util.HashSet;
4-import java.util.Set;
5-
6-import com.vladsch.flexmark.ast.HardLineBreak;
7-import com.vladsch.flexmark.ast.Image;
8-import com.vladsch.flexmark.ast.Paragraph;
9-import com.vladsch.flexmark.ast.SoftLineBreak;
10-import com.vladsch.flexmark.html.CustomNodeRenderer;
11-import com.vladsch.flexmark.html.HtmlWriter;
12-import com.vladsch.flexmark.html.renderer.JapaneseTextLayoutAccessor;
13-import com.vladsch.flexmark.html.renderer.NodeRenderer;
14-import com.vladsch.flexmark.html.renderer.NodeRendererContext;
15-import com.vladsch.flexmark.html.renderer.NodeRenderingHandler;
16-import com.vladsch.flexmark.html.renderer.TextCollectingAppendable;
17-import com.vladsch.flexmark.util.ast.Node;
18-import com.vladsch.flexmark.util.options.DataHolder;
19-
20-import net.osdn.blogs.flexmark.ext.text_layout_ja.core.Processor;
21-
22-public class JapaneseTextLayoutRenderer implements NodeRenderer {
23-
24- private JapaneseTextLayoutAccessor coreNodeRenderer;
25-
26- public JapaneseTextLayoutRenderer(DataHolder options) {
27- coreNodeRenderer = new JapaneseTextLayoutAccessor(options);
28- }
29-
30- @Override
31- public Set<NodeRenderingHandler<?>> getNodeRenderingHandlers() {
32- Set<NodeRenderingHandler<?>> set = new HashSet<NodeRenderingHandler<?>>();
33- set.add(new NodeRenderingHandler<Paragraph>(Paragraph.class, new CustomNodeRenderer<Paragraph>() {
34- @Override
35- public void render(Paragraph node, NodeRendererContext context, HtmlWriter html) {
36- JapaneseTextLayoutRenderer.this.render(node, context, html);
37- }
38- }));
39- return set;
40- }
41-
42- protected void render(Paragraph node, NodeRendererContext context, HtmlWriter html) {
43- TextCollectingAppendable out = new TextCollectingAppendable();
44- NodeRendererContext subContext = context.getSubContext(out, true);
45-
46- HtmlWriter subHtml = subContext.getHtmlWriter();
47-
48- boolean isImageOnly = true;
49- for(Node child : node.getChildren()) {
50- if(child instanceof Image) {
51- continue;
52- }
53- if(child instanceof SoftLineBreak) {
54- continue;
55- }
56- if(child instanceof HardLineBreak) {
57- continue;
58- }
59- isImageOnly = false;
60- }
61- if(isImageOnly) {
62- subHtml.attr("class", "images-only");
63- }
64-
65- coreNodeRenderer.render(node, subContext, subHtml);
66- html.append(Processor.layout(out.getHtml()));
67-
68- /*
69- if (node.getFirstChildAnyNot(NonRenderingInline.class) != null) {
70- if (!(node.getParent() instanceof ParagraphItemContainer)
71- || !((ParagraphItemContainer)node.getParent()).isParagraphWrappingDisabled(node, listOptions, context.getOptions())) {
72- output = Processor.layout(output);
73- }
74- }
75- */
76- }
77-}
--- flexmark-ext-text-layout-ja/trunk/src/main/java/com/vladsch/flexmark/html/renderer/JapaneseTextLayoutAccessor.java (revision 86)
+++ flexmark-ext-text-layout-ja/trunk/src/main/java/com/vladsch/flexmark/html/renderer/JapaneseTextLayoutAccessor.java (nonexistent)
@@ -1,17 +0,0 @@
1-package com.vladsch.flexmark.html.renderer;
2-
3-import com.vladsch.flexmark.ast.Paragraph;
4-import com.vladsch.flexmark.html.HtmlWriter;
5-import com.vladsch.flexmark.util.options.DataHolder;
6-
7-public class JapaneseTextLayoutAccessor extends CoreNodeRenderer {
8-
9- public JapaneseTextLayoutAccessor(DataHolder options) {
10- super(options);
11- }
12-
13- @Override
14- public void render(Paragraph node, NodeRendererContext context, HtmlWriter html) {
15- super.render(node, context, html);
16- }
17-}
旧リポジトリブラウザで表示