Hi,
how can I figure out in a tag extension callback e.g.
function wfSampleRender( $input, array $args, Parser $parser, PPFrame $frame )
if the parser is inside a block mode or not? With block mode I mean something like :<mytag></mytag> or #<mytag></mytag> or
<mytag></mytag>
but not blindtext <mytag></mytag> more text
If there is an extension that uses ways to dermine the "block" a link would help a lot.
Best regards physikerwelt
On 2013-04-28 6:01 AM, "Moritz Schubotz" physik@physikerwelt.de wrote:
Hi,
how can I figure out in a tag extension callback e.g.
function wfSampleRender( $input, array $args, Parser $parser, PPFrame
$frame )
if the parser is inside a block mode or not? With block mode I mean something like :<mytag></mytag> or #<mytag></mytag> or
<mytag></mytag>
but not blindtext <mytag></mytag> more text
If there is an extension that uses ways to dermine the "block" a link would help a lot.
Best regards physikerwelt
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
What are you trying to do that requires that knowledge? Off the top of my head (so could be wrong) block level-ness is determined entirely after parser tags are replaced.
If you are woried about doBlockLevels messing up the output of your extension, you can return an array with certain structure to tell the parser to protect your output from doBlockLevels messing with it. (Which is for example how <nowiki> is implemented internally I believe)
-bawolff
Hi bawolff,
I'm trying the following. Looking for example at http://math-test.instance-proxy.wmflabs.org/wiki/Summation
The equations denoted with \n:<math e.g. :<math>\sum_a^b</math> should be rendered in displaystyle, whereas inline equations e.g. Let <math>\sum_i 2^{-i}</math> should be rendered normal.
Best Moritz
On Sun, Apr 28, 2013 at 8:32 PM, Brian Wolff bawolff@gmail.com wrote:
On 2013-04-28 6:01 AM, "Moritz Schubotz" physik@physikerwelt.de wrote:
Hi,
how can I figure out in a tag extension callback e.g.
function wfSampleRender( $input, array $args, Parser $parser, PPFrame
$frame )
if the parser is inside a block mode or not? With block mode I mean something like :<mytag></mytag> or #<mytag></mytag> or
<mytag></mytag>
but not blindtext <mytag></mytag> more text
If there is an extension that uses ways to dermine the "block" a link would help a lot.
Best regards physikerwelt
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
What are you trying to do that requires that knowledge? Off the top of my head (so could be wrong) block level-ness is determined entirely after parser tags are replaced.
If you are woried about doBlockLevels messing up the output of your extension, you can return an array with certain structure to tell the parser to protect your output from doBlockLevels messing with it. (Which is for example how <nowiki> is implemented internally I believe)
-bawolff _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hmm. I don't think that is really possible. You may have to simply do <math mode="block"> and <math mode="inline"> instead.
-bawolff On 2013-05-01 4:15 AM, "Moritz Schubotz" physik@physikerwelt.de wrote:
Hi bawolff,
I'm trying the following. Looking for example at http://math-test.instance-proxy.wmflabs.org/wiki/Summation
The equations denoted with \n:<math e.g. :<math>\sum_a^b</math> should be rendered in displaystyle, whereas inline equations e.g. Let <math>\sum_i 2^{-i}</math> should be rendered normal.
Best Moritz
On Sun, Apr 28, 2013 at 8:32 PM, Brian Wolff bawolff@gmail.com wrote:
On 2013-04-28 6:01 AM, "Moritz Schubotz" physik@physikerwelt.de wrote:
Hi,
how can I figure out in a tag extension callback e.g.
function wfSampleRender( $input, array $args, Parser $parser, PPFrame
$frame )
if the parser is inside a block mode or not? With block mode I mean something like :<mytag></mytag> or #<mytag></mytag> or
<mytag></mytag>
but not blindtext <mytag></mytag> more text
If there is an extension that uses ways to dermine the "block" a link would help a lot.
Best regards physikerwelt
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
What are you trying to do that requires that knowledge? Off the top of
my
head (so could be wrong) block level-ness is determined entirely after parser tags are replaced.
If you are woried about doBlockLevels messing up the output of your extension, you can return an array with certain structure to tell the parser to protect your output from doBlockLevels messing with it.
(Which is
for example how <nowiki> is implemented internally I believe)
-bawolff _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
-- Mit freundlichen Grüßen Moritz Schubotz
Telefon (Büro): +49 30 314 22784 Telefon (Privat):+49 30 488 27330 E-Mail: schubotz@itp.physik.tu-berlin.de Web: http://www.physikerwelt.de Skype: Schubi87 ICQ: 200302764 Msn: Moritz@Schubotz.de
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
The problem is that there are thousands of pages that use :<math/> without block mode.
Best Moritz
On Wed, May 1, 2013 at 12:44 PM, Brian Wolff bawolff@gmail.com wrote:
Hmm. I don't think that is really possible. You may have to simply do <math mode="block"> and <math mode="inline"> instead.
-bawolff On 2013-05-01 4:15 AM, "Moritz Schubotz" physik@physikerwelt.de wrote:
Hi bawolff,
I'm trying the following. Looking for example at http://math-test.instance-proxy.wmflabs.org/wiki/Summation
The equations denoted with \n:<math e.g. :<math>\sum_a^b</math> should be rendered in displaystyle, whereas inline equations e.g. Let <math>\sum_i 2^{-i}</math> should be rendered normal.
Best Moritz
On Sun, Apr 28, 2013 at 8:32 PM, Brian Wolff bawolff@gmail.com wrote:
On 2013-04-28 6:01 AM, "Moritz Schubotz" physik@physikerwelt.de wrote:
Hi,
how can I figure out in a tag extension callback e.g.
function wfSampleRender( $input, array $args, Parser $parser, PPFrame
$frame )
if the parser is inside a block mode or not? With block mode I mean something like :<mytag></mytag> or #<mytag></mytag> or
<mytag></mytag>
but not blindtext <mytag></mytag> more text
If there is an extension that uses ways to dermine the "block" a link would help a lot.
Best regards physikerwelt
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
What are you trying to do that requires that knowledge? Off the top of
my
head (so could be wrong) block level-ness is determined entirely after parser tags are replaced.
If you are woried about doBlockLevels messing up the output of your extension, you can return an array with certain structure to tell the parser to protect your output from doBlockLevels messing with it.
(Which is
for example how <nowiki> is implemented internally I believe)
-bawolff _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
-- Mit freundlichen Grüßen Moritz Schubotz
Telefon (Büro): +49 30 314 22784 Telefon (Privat):+49 30 488 27330 E-Mail: schubotz@itp.physik.tu-berlin.de Web: http://www.physikerwelt.de Skype: Schubi87 ICQ: 200302764 Msn: Moritz@Schubotz.de
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org