Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to block recursive annotation during an internal parse, refs 1076 #1455

Merged
merged 1 commit into from
Mar 19, 2016

Conversation

mwjames
Copy link
Contributor

@mwjames mwjames commented Mar 13, 2016

refs #1076

Use case: The embedded format no longer adds #set/#subobject annotations that are imported via an embedded page using #ask.

Categories remain special [0] as there are parsed and handled by MW.

[0] https://www.semantic-mediawiki.org/wiki/Help:Embedded_format#Limitations

@mwjames mwjames added the new feature A new, or altered behaviour of an existing functionality that fundamentally impacts behaviour label Mar 13, 2016
@mwjames mwjames added this to the SMW 2.4 milestone Mar 13, 2016
@mwjames
Copy link
Contributor Author

mwjames commented Mar 14, 2016

@mwjames
Copy link
Contributor Author

mwjames commented Mar 19, 2016

@kghbln @D-Groenewegen This should fix the issue where #set/#subobject annotations are copied/imported when embedded is used.

mwjames added a commit that referenced this pull request Mar 19, 2016
Allow to block recursive annotation during an internal parse, refs 1076
@mwjames mwjames merged commit 2c3c55c into master Mar 19, 2016
@mwjames mwjames deleted the block branch March 19, 2016 02:36
@D-Groenewegen
Copy link
Contributor

Not sure why the 'facts about' box does not appear, but our example at http://sandbox.semantic-mediawiki.org/wiki/Lorem_ipsum_3 now demonstrates that contents from a different page can be embedded without importing its annotations.

Thanks for this @mwjames!

@mwjames
Copy link
Contributor Author

mwjames commented Mar 21, 2016

Not sure why the 'facts about' box does not appear, but our example at http://sandbox.semantic-mediawiki.org/wiki/Lorem_ipsum_3

Because your example page only has non-visible property values where the Factbox will not appear.

[0] shows that we have to lift the block after the recursive parse has finished (which was initiated by the result printer) to ensure that [[ ... :: ...]] (#set are isolated and run before the InTextAnnotationParser) can be processed afterwards.

@@ -346,10 +346,15 @@ abstract class ResultPrinter extends \ContextSource implements QueryResultPrinte
            }

            self::$mRecursionDepth--;
        }

+       $wgParser->getOutput()->setExtensionData(
+           'smw-blockannotation',
+           false
+       );

[0] http://sandbox.semantic-mediawiki.org/wiki/Issue/1455_%28with_Factbox%29

mwjames added a commit that referenced this pull request Mar 22, 2016
Disable block state after recursive execution, refs #1455
@kghbln
Copy link
Member

kghbln commented Jan 26, 2017

Finally documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new, or altered behaviour of an existing functionality that fundamentally impacts behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants