Fossil SCM

Added pikchr block 'source-inline' modifier for the 'source' flag which tells the latter that the sources should be rendered inline (same position as the graphic), rather than left-aligned.

stephan 2020-09-18 20:01 trunk
Commit 3f2c0af278e3422f71efcbc84ffdeba29c360b7e4fe661ccac544df72b73dca5
+19 -7
--- src/default.css
+++ src/default.css
@@ -1396,44 +1396,56 @@
13961396
<DIV.pikchr-svg>
13971397
<SVG.pikchr>...</SVG>
13981398
</DIV.pikchr-svg>
13991399
<PRE.pikchr-src>...</PRE>
14001400
</DIV.pikchr-wrapper>
1401
+
14011402
************************************************************/
14021403
div.pikchr-wrapper {/*outer wrapper elem for a pikchr construct*/}
14031404
div.pikchr-svg {/*wrapper for SVG.pikchr element*/}
14041405
svg.pikchr {/*pikchr SVG*/}
14051406
pre.pikchr-src {/*source code view for a pikchr (see fossil.pikchr.js)*/
14061407
box-sizing: border-box;
14071408
overflow: auto;
14081409
text-align: left;
14091410
}
1410
-div.pikchr-wrapper.center {
1411
+/* The .source-inline class tells the .source class that the
1412
+ source view, when enbaled, should be "inline" (same position
1413
+ as the graphic), else the sources are shifted to the left as
1414
+ if they were "plain text". */
1415
+div.pikchr-wrapper.center:not(.source),
1416
+div.pikchr-wrapper.center.source.source-inline{
14111417
text-align: center;
14121418
}
14131419
div.pikchr-wrapper.center > div.pikchr-svg {
14141420
width: 100%/*necessary for Chrome!*/;
14151421
}
1416
-div.pikchr-wrapper.center > pre.pikchr-src,
1417
-div.pikchr-wrapper.center > div.pikchr-svg{
1422
+div.pikchr-wrapper.center:not(.source) > pre.pikchr-src,
1423
+div.pikchr-wrapper.center:not(.source) > div.pikchr-svg,
1424
+div.pikchr-wrapper.center.source.source-inline > pre.pikchr-src,
1425
+div.pikchr-wrapper.center.source.source-inline > div.pikchr-svg{
14181426
display:inline-block/*allows text-align to do the alignment*/;
14191427
}
1420
-div.pikchr-wrapper.indent {
1428
+div.pikchr-wrapper.indent:not(.source),
1429
+div.pikchr-wrapper.indent.source.source-inline{
14211430
margin-left: 4em;
14221431
}
1423
-div.pikchr-wrapper.float-left {
1432
+div.pikchr-wrapper.float-left:not(.source),
1433
+div.pikchr-wrapper.float-left.source.source-inline {
14241434
float: left;
14251435
padding: 4em;
14261436
}
1427
-div.pikchr-wrapper.float-right {
1437
+div.pikchr-wrapper.float-right:not(.source),
1438
+div.pikchr-wrapper.float-right.source.source-inline{
14281439
float: right;
14291440
padding: 4em;
14301441
}
14311442
1443
+/* For .source view, pre.pikchr-src and reveal svg.pikchr... */
14321444
div.pikchr-wrapper.source > pre.pikchr-src {
1445
+ /* Source code ^^^^^^^ is visible */
14331446
}
1434
-/* For non-source view, pre.pikchr-src and reveal svg.pikchr... */
14351447
div.pikchr-wrapper:not(.source) > pre.pikchr-src {
14361448
position: absolute !important;
14371449
opacity: 0 !important;
14381450
pointer-events: none !important;
14391451
display: none !important;
14401452
--- src/default.css
+++ src/default.css
@@ -1396,44 +1396,56 @@
1396 <DIV.pikchr-svg>
1397 <SVG.pikchr>...</SVG>
1398 </DIV.pikchr-svg>
1399 <PRE.pikchr-src>...</PRE>
1400 </DIV.pikchr-wrapper>
 
1401 ************************************************************/
1402 div.pikchr-wrapper {/*outer wrapper elem for a pikchr construct*/}
1403 div.pikchr-svg {/*wrapper for SVG.pikchr element*/}
1404 svg.pikchr {/*pikchr SVG*/}
1405 pre.pikchr-src {/*source code view for a pikchr (see fossil.pikchr.js)*/
1406 box-sizing: border-box;
1407 overflow: auto;
1408 text-align: left;
1409 }
1410 div.pikchr-wrapper.center {
 
 
 
 
 
1411 text-align: center;
1412 }
1413 div.pikchr-wrapper.center > div.pikchr-svg {
1414 width: 100%/*necessary for Chrome!*/;
1415 }
1416 div.pikchr-wrapper.center > pre.pikchr-src,
1417 div.pikchr-wrapper.center > div.pikchr-svg{
 
 
1418 display:inline-block/*allows text-align to do the alignment*/;
1419 }
1420 div.pikchr-wrapper.indent {
 
1421 margin-left: 4em;
1422 }
1423 div.pikchr-wrapper.float-left {
 
1424 float: left;
1425 padding: 4em;
1426 }
1427 div.pikchr-wrapper.float-right {
 
1428 float: right;
1429 padding: 4em;
1430 }
1431
 
1432 div.pikchr-wrapper.source > pre.pikchr-src {
 
1433 }
1434 /* For non-source view, pre.pikchr-src and reveal svg.pikchr... */
1435 div.pikchr-wrapper:not(.source) > pre.pikchr-src {
1436 position: absolute !important;
1437 opacity: 0 !important;
1438 pointer-events: none !important;
1439 display: none !important;
1440
--- src/default.css
+++ src/default.css
@@ -1396,44 +1396,56 @@
1396 <DIV.pikchr-svg>
1397 <SVG.pikchr>...</SVG>
1398 </DIV.pikchr-svg>
1399 <PRE.pikchr-src>...</PRE>
1400 </DIV.pikchr-wrapper>
1401
1402 ************************************************************/
1403 div.pikchr-wrapper {/*outer wrapper elem for a pikchr construct*/}
1404 div.pikchr-svg {/*wrapper for SVG.pikchr element*/}
1405 svg.pikchr {/*pikchr SVG*/}
1406 pre.pikchr-src {/*source code view for a pikchr (see fossil.pikchr.js)*/
1407 box-sizing: border-box;
1408 overflow: auto;
1409 text-align: left;
1410 }
1411 /* The .source-inline class tells the .source class that the
1412 source view, when enbaled, should be "inline" (same position
1413 as the graphic), else the sources are shifted to the left as
1414 if they were "plain text". */
1415 div.pikchr-wrapper.center:not(.source),
1416 div.pikchr-wrapper.center.source.source-inline{
1417 text-align: center;
1418 }
1419 div.pikchr-wrapper.center > div.pikchr-svg {
1420 width: 100%/*necessary for Chrome!*/;
1421 }
1422 div.pikchr-wrapper.center:not(.source) > pre.pikchr-src,
1423 div.pikchr-wrapper.center:not(.source) > div.pikchr-svg,
1424 div.pikchr-wrapper.center.source.source-inline > pre.pikchr-src,
1425 div.pikchr-wrapper.center.source.source-inline > div.pikchr-svg{
1426 display:inline-block/*allows text-align to do the alignment*/;
1427 }
1428 div.pikchr-wrapper.indent:not(.source),
1429 div.pikchr-wrapper.indent.source.source-inline{
1430 margin-left: 4em;
1431 }
1432 div.pikchr-wrapper.float-left:not(.source),
1433 div.pikchr-wrapper.float-left.source.source-inline {
1434 float: left;
1435 padding: 4em;
1436 }
1437 div.pikchr-wrapper.float-right:not(.source),
1438 div.pikchr-wrapper.float-right.source.source-inline{
1439 float: right;
1440 padding: 4em;
1441 }
1442
1443 /* For .source view, pre.pikchr-src and reveal svg.pikchr... */
1444 div.pikchr-wrapper.source > pre.pikchr-src {
1445 /* Source code ^^^^^^^ is visible */
1446 }
 
1447 div.pikchr-wrapper:not(.source) > pre.pikchr-src {
1448 position: absolute !important;
1449 opacity: 0 !important;
1450 pointer-events: none !important;
1451 display: none !important;
1452
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -362,10 +362,12 @@
362362
pikFlags |= PIKCHR_PROCESS_DIV_FLOAT_RIGHT;
363363
}else if( i==6 && strncmp(zArg, "toggle", 6)==0 ){
364364
pikFlags |= PIKCHR_PROCESS_DIV_TOGGLE;
365365
}else if( i==6 && strncmp(zArg, "source", 6)==0 ){
366366
pikFlags |= PIKCHR_PROCESS_DIV_SOURCE;
367
+ }else if( i==13 && strncmp(zArg, "source-inline", 13)==0 ){
368
+ pikFlags |= PIKCHR_PROCESS_DIV_SOURCE_INLINE;
367369
}
368370
while( i<nArg && fossil_isspace(zArg[i]) ){ i++; }
369371
zArg += i;
370372
nArg -= i;
371373
}
372374
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -362,10 +362,12 @@
362 pikFlags |= PIKCHR_PROCESS_DIV_FLOAT_RIGHT;
363 }else if( i==6 && strncmp(zArg, "toggle", 6)==0 ){
364 pikFlags |= PIKCHR_PROCESS_DIV_TOGGLE;
365 }else if( i==6 && strncmp(zArg, "source", 6)==0 ){
366 pikFlags |= PIKCHR_PROCESS_DIV_SOURCE;
 
 
367 }
368 while( i<nArg && fossil_isspace(zArg[i]) ){ i++; }
369 zArg += i;
370 nArg -= i;
371 }
372
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -362,10 +362,12 @@
362 pikFlags |= PIKCHR_PROCESS_DIV_FLOAT_RIGHT;
363 }else if( i==6 && strncmp(zArg, "toggle", 6)==0 ){
364 pikFlags |= PIKCHR_PROCESS_DIV_TOGGLE;
365 }else if( i==6 && strncmp(zArg, "source", 6)==0 ){
366 pikFlags |= PIKCHR_PROCESS_DIV_SOURCE;
367 }else if( i==13 && strncmp(zArg, "source-inline", 13)==0 ){
368 pikFlags |= PIKCHR_PROCESS_DIV_SOURCE_INLINE;
369 }
370 while( i<nArg && fossil_isspace(zArg[i]) ){ i++; }
371 zArg += i;
372 nArg -= i;
373 }
374
+28 -11
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -28,16 +28,17 @@
2828
#define PIKCHR_PROCESS_TH1_NOSVG 0x02
2929
#define PIKCHR_PROCESS_NONCE 0x04
3030
#define PIKCHR_PROCESS_ERR_PRE 0x08
3131
#define PIKCHR_PROCESS_SRC 0x10
3232
#define PIKCHR_PROCESS_DIV 0x20
33
-#define PIKCHR_PROCESS_DIV_INDENT 0x0100
34
-#define PIKCHR_PROCESS_DIV_CENTER 0x0200
35
-#define PIKCHR_PROCESS_DIV_FLOAT_LEFT 0x0400
36
-#define PIKCHR_PROCESS_DIV_FLOAT_RIGHT 0x0800
37
-#define PIKCHR_PROCESS_DIV_TOGGLE 0x1000
38
-#define PIKCHR_PROCESS_DIV_SOURCE 0x2000
33
+#define PIKCHR_PROCESS_DIV_INDENT 0x0100
34
+#define PIKCHR_PROCESS_DIV_CENTER 0x0200
35
+#define PIKCHR_PROCESS_DIV_FLOAT_LEFT 0x0400
36
+#define PIKCHR_PROCESS_DIV_FLOAT_RIGHT 0x0800
37
+#define PIKCHR_PROCESS_DIV_TOGGLE 0x1000
38
+#define PIKCHR_PROCESS_DIV_SOURCE 0x2000
39
+#define PIKCHR_PROCESS_DIV_SOURCE_INLINE 0x4000
3940
#endif
4041
4142
/*
4243
** Processes a pikchr script, optionally with embedded TH1, and
4344
** produces HTML code for it. zIn is the NUL-terminated input
@@ -86,10 +87,16 @@
8687
** - PIKCHR_PROCESS_DIV_SOURCE: adds the 'source' CSS class to the
8788
** outer DIV, which is a hint to the client-side renderer (see
8889
** fossil.pikchr.js) that the pikchr should initially be rendered
8990
** in source code form mode (the default is to hide the source and
9091
** show the SVG).
92
+**
93
+** - PIKCHR_PROCESS_DIV_SOURCE_INLINE: adds the 'source-inline' CSS
94
+** class to the outer wrapper. If PIKCHR_PROCESS_DIV_SOURCE is
95
+** specified, this modifier indicates that the source code view
96
+** should be rendered "inline" (same position as the graphic), else
97
+** it is to be left-aligned.
9198
**
9299
** - PIKCHR_PROCESS_NONCE: if set, the resulting SVG/DIV are wrapped
93100
** in "safe nonce" comments, which are a fossil-internal mechanism
94101
** which prevents the wiki/markdown processors from re-processing this
95102
** output. This is necessary when calling this routine in the context
@@ -97,12 +104,12 @@
97104
** an image for /pikchrpage.
98105
**
99106
** - PIKCHR_PROCESS_SRC: if set, a new PRE.pikchr-src element is
100107
** injected adjacent to the SVG element which contains the
101108
** HTML-escaped content of the input script. If
102
-** PIKCHR_PROCESS_DIV_SOURCE is set, this flag is automatically
103
-** implied.
109
+** PIKCHR_PROCESS_DIV_SOURCE or PIKCHR_PROCESS_DIV_SOURCE_INLINE is
110
+** set, this flag is automatically implied.
104111
**
105112
** - PIKCHR_PROCESS_ERR_PRE: if set and pikchr() fails, the resulting
106113
** error report is wrapped in a PRE element, else it is retained
107114
** as-is (intended only for console output).
108115
*/
@@ -116,10 +123,11 @@
116123
&& (PIKCHR_PROCESS_DIV_INDENT
117124
| PIKCHR_PROCESS_DIV_CENTER
118125
| PIKCHR_PROCESS_DIV_FLOAT_RIGHT
119126
| PIKCHR_PROCESS_DIV_FLOAT_LEFT
120127
| PIKCHR_PROCESS_DIV_SOURCE
128
+ | PIKCHR_PROCESS_DIV_SOURCE_INLINE
121129
| PIKCHR_PROCESS_DIV_TOGGLE
122130
) & pikFlags){
123131
pikFlags |= PIKCHR_PROCESS_DIV;
124132
}
125133
if(!(PIKCHR_PROCESS_TH1 & pikFlags)
@@ -170,15 +178,23 @@
170178
zWrapperClass = " float-right";
171179
}
172180
if(PIKCHR_PROCESS_DIV_TOGGLE & pikFlags){
173181
zClassToggle = " toggle";
174182
}
175
- if(PIKCHR_PROCESS_DIV_SOURCE & pikFlags){
183
+ if(PIKCHR_PROCESS_DIV_SOURCE_INLINE & pikFlags){
184
+ if(PIKCHR_PROCESS_DIV_SOURCE & pikFlags){
185
+ zClassSource = " source source-inline";
186
+ }else{
187
+ zClassSource = " source-inline";
188
+ }
189
+ pikFlags |= PIKCHR_PROCESS_SRC;
190
+ }else if(PIKCHR_PROCESS_DIV_SOURCE & pikFlags){
176191
zClassSource = " source";
177192
pikFlags |= PIKCHR_PROCESS_SRC;
178193
}
179
- blob_appendf(pOut,"<div class='pikchr-wrapper%s%s%s'>"
194
+ blob_appendf(pOut,"<div class='pikchr-wrapper "
195
+ "%s%s%s'>"
180196
"<div class=\"pikchr-svg\" "
181197
"style=\"max-width:%dpx\">\n",
182198
zWrapperClass/*safe-for-%s*/,
183199
zClassToggle/*safe-for-%s*/,
184200
zClassSource/*safe-for-%s*/, w);
@@ -225,11 +241,12 @@
225241
** value to pre-populate the editor with that code.
226242
*/
227243
void pikchrshow_page(void){
228244
const char *zContent = 0;
229245
int isDark; /* true if the current skin is "dark" */
230
- int pikFlags = PIKCHR_PROCESS_DIV
246
+ int pikFlags =
247
+ PIKCHR_PROCESS_DIV
231248
| PIKCHR_PROCESS_SRC
232249
| PIKCHR_PROCESS_ERR_PRE;
233250
234251
login_check_credentials();
235252
if( !g.perm.RdWiki && !g.perm.Read && !g.perm.RdForum ){
236253
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -28,16 +28,17 @@
28 #define PIKCHR_PROCESS_TH1_NOSVG 0x02
29 #define PIKCHR_PROCESS_NONCE 0x04
30 #define PIKCHR_PROCESS_ERR_PRE 0x08
31 #define PIKCHR_PROCESS_SRC 0x10
32 #define PIKCHR_PROCESS_DIV 0x20
33 #define PIKCHR_PROCESS_DIV_INDENT 0x0100
34 #define PIKCHR_PROCESS_DIV_CENTER 0x0200
35 #define PIKCHR_PROCESS_DIV_FLOAT_LEFT 0x0400
36 #define PIKCHR_PROCESS_DIV_FLOAT_RIGHT 0x0800
37 #define PIKCHR_PROCESS_DIV_TOGGLE 0x1000
38 #define PIKCHR_PROCESS_DIV_SOURCE 0x2000
 
39 #endif
40
41 /*
42 ** Processes a pikchr script, optionally with embedded TH1, and
43 ** produces HTML code for it. zIn is the NUL-terminated input
@@ -86,10 +87,16 @@
86 ** - PIKCHR_PROCESS_DIV_SOURCE: adds the 'source' CSS class to the
87 ** outer DIV, which is a hint to the client-side renderer (see
88 ** fossil.pikchr.js) that the pikchr should initially be rendered
89 ** in source code form mode (the default is to hide the source and
90 ** show the SVG).
 
 
 
 
 
 
91 **
92 ** - PIKCHR_PROCESS_NONCE: if set, the resulting SVG/DIV are wrapped
93 ** in "safe nonce" comments, which are a fossil-internal mechanism
94 ** which prevents the wiki/markdown processors from re-processing this
95 ** output. This is necessary when calling this routine in the context
@@ -97,12 +104,12 @@
97 ** an image for /pikchrpage.
98 **
99 ** - PIKCHR_PROCESS_SRC: if set, a new PRE.pikchr-src element is
100 ** injected adjacent to the SVG element which contains the
101 ** HTML-escaped content of the input script. If
102 ** PIKCHR_PROCESS_DIV_SOURCE is set, this flag is automatically
103 ** implied.
104 **
105 ** - PIKCHR_PROCESS_ERR_PRE: if set and pikchr() fails, the resulting
106 ** error report is wrapped in a PRE element, else it is retained
107 ** as-is (intended only for console output).
108 */
@@ -116,10 +123,11 @@
116 && (PIKCHR_PROCESS_DIV_INDENT
117 | PIKCHR_PROCESS_DIV_CENTER
118 | PIKCHR_PROCESS_DIV_FLOAT_RIGHT
119 | PIKCHR_PROCESS_DIV_FLOAT_LEFT
120 | PIKCHR_PROCESS_DIV_SOURCE
 
121 | PIKCHR_PROCESS_DIV_TOGGLE
122 ) & pikFlags){
123 pikFlags |= PIKCHR_PROCESS_DIV;
124 }
125 if(!(PIKCHR_PROCESS_TH1 & pikFlags)
@@ -170,15 +178,23 @@
170 zWrapperClass = " float-right";
171 }
172 if(PIKCHR_PROCESS_DIV_TOGGLE & pikFlags){
173 zClassToggle = " toggle";
174 }
175 if(PIKCHR_PROCESS_DIV_SOURCE & pikFlags){
 
 
 
 
 
 
 
176 zClassSource = " source";
177 pikFlags |= PIKCHR_PROCESS_SRC;
178 }
179 blob_appendf(pOut,"<div class='pikchr-wrapper%s%s%s'>"
 
180 "<div class=\"pikchr-svg\" "
181 "style=\"max-width:%dpx\">\n",
182 zWrapperClass/*safe-for-%s*/,
183 zClassToggle/*safe-for-%s*/,
184 zClassSource/*safe-for-%s*/, w);
@@ -225,11 +241,12 @@
225 ** value to pre-populate the editor with that code.
226 */
227 void pikchrshow_page(void){
228 const char *zContent = 0;
229 int isDark; /* true if the current skin is "dark" */
230 int pikFlags = PIKCHR_PROCESS_DIV
 
231 | PIKCHR_PROCESS_SRC
232 | PIKCHR_PROCESS_ERR_PRE;
233
234 login_check_credentials();
235 if( !g.perm.RdWiki && !g.perm.Read && !g.perm.RdForum ){
236
--- src/pikchrshow.c
+++ src/pikchrshow.c
@@ -28,16 +28,17 @@
28 #define PIKCHR_PROCESS_TH1_NOSVG 0x02
29 #define PIKCHR_PROCESS_NONCE 0x04
30 #define PIKCHR_PROCESS_ERR_PRE 0x08
31 #define PIKCHR_PROCESS_SRC 0x10
32 #define PIKCHR_PROCESS_DIV 0x20
33 #define PIKCHR_PROCESS_DIV_INDENT 0x0100
34 #define PIKCHR_PROCESS_DIV_CENTER 0x0200
35 #define PIKCHR_PROCESS_DIV_FLOAT_LEFT 0x0400
36 #define PIKCHR_PROCESS_DIV_FLOAT_RIGHT 0x0800
37 #define PIKCHR_PROCESS_DIV_TOGGLE 0x1000
38 #define PIKCHR_PROCESS_DIV_SOURCE 0x2000
39 #define PIKCHR_PROCESS_DIV_SOURCE_INLINE 0x4000
40 #endif
41
42 /*
43 ** Processes a pikchr script, optionally with embedded TH1, and
44 ** produces HTML code for it. zIn is the NUL-terminated input
@@ -86,10 +87,16 @@
87 ** - PIKCHR_PROCESS_DIV_SOURCE: adds the 'source' CSS class to the
88 ** outer DIV, which is a hint to the client-side renderer (see
89 ** fossil.pikchr.js) that the pikchr should initially be rendered
90 ** in source code form mode (the default is to hide the source and
91 ** show the SVG).
92 **
93 ** - PIKCHR_PROCESS_DIV_SOURCE_INLINE: adds the 'source-inline' CSS
94 ** class to the outer wrapper. If PIKCHR_PROCESS_DIV_SOURCE is
95 ** specified, this modifier indicates that the source code view
96 ** should be rendered "inline" (same position as the graphic), else
97 ** it is to be left-aligned.
98 **
99 ** - PIKCHR_PROCESS_NONCE: if set, the resulting SVG/DIV are wrapped
100 ** in "safe nonce" comments, which are a fossil-internal mechanism
101 ** which prevents the wiki/markdown processors from re-processing this
102 ** output. This is necessary when calling this routine in the context
@@ -97,12 +104,12 @@
104 ** an image for /pikchrpage.
105 **
106 ** - PIKCHR_PROCESS_SRC: if set, a new PRE.pikchr-src element is
107 ** injected adjacent to the SVG element which contains the
108 ** HTML-escaped content of the input script. If
109 ** PIKCHR_PROCESS_DIV_SOURCE or PIKCHR_PROCESS_DIV_SOURCE_INLINE is
110 ** set, this flag is automatically implied.
111 **
112 ** - PIKCHR_PROCESS_ERR_PRE: if set and pikchr() fails, the resulting
113 ** error report is wrapped in a PRE element, else it is retained
114 ** as-is (intended only for console output).
115 */
@@ -116,10 +123,11 @@
123 && (PIKCHR_PROCESS_DIV_INDENT
124 | PIKCHR_PROCESS_DIV_CENTER
125 | PIKCHR_PROCESS_DIV_FLOAT_RIGHT
126 | PIKCHR_PROCESS_DIV_FLOAT_LEFT
127 | PIKCHR_PROCESS_DIV_SOURCE
128 | PIKCHR_PROCESS_DIV_SOURCE_INLINE
129 | PIKCHR_PROCESS_DIV_TOGGLE
130 ) & pikFlags){
131 pikFlags |= PIKCHR_PROCESS_DIV;
132 }
133 if(!(PIKCHR_PROCESS_TH1 & pikFlags)
@@ -170,15 +178,23 @@
178 zWrapperClass = " float-right";
179 }
180 if(PIKCHR_PROCESS_DIV_TOGGLE & pikFlags){
181 zClassToggle = " toggle";
182 }
183 if(PIKCHR_PROCESS_DIV_SOURCE_INLINE & pikFlags){
184 if(PIKCHR_PROCESS_DIV_SOURCE & pikFlags){
185 zClassSource = " source source-inline";
186 }else{
187 zClassSource = " source-inline";
188 }
189 pikFlags |= PIKCHR_PROCESS_SRC;
190 }else if(PIKCHR_PROCESS_DIV_SOURCE & pikFlags){
191 zClassSource = " source";
192 pikFlags |= PIKCHR_PROCESS_SRC;
193 }
194 blob_appendf(pOut,"<div class='pikchr-wrapper "
195 "%s%s%s'>"
196 "<div class=\"pikchr-svg\" "
197 "style=\"max-width:%dpx\">\n",
198 zWrapperClass/*safe-for-%s*/,
199 zClassToggle/*safe-for-%s*/,
200 zClassSource/*safe-for-%s*/, w);
@@ -225,11 +241,12 @@
241 ** value to pre-populate the editor with that code.
242 */
243 void pikchrshow_page(void){
244 const char *zContent = 0;
245 int isDark; /* true if the current skin is "dark" */
246 int pikFlags =
247 PIKCHR_PROCESS_DIV
248 | PIKCHR_PROCESS_SRC
249 | PIKCHR_PROCESS_ERR_PRE;
250
251 login_check_credentials();
252 if( !g.perm.RdWiki && !g.perm.Read && !g.perm.RdForum ){
253

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button