possible answer
authorhttp://kerravonsen.dreamwidth.org/ <http://kerravonsen.dreamwidth.org/@web>
Thu, 3 Dec 2009 02:01:10 +0000 (21:01 -0500)
committerJoey Hess <joey@kitenet.net>
Thu, 3 Dec 2009 02:01:10 +0000 (21:01 -0500)
doc/forum/understanding_filter_hooks.mdwn

index 061d6d29584666beb53f259fd66283e2e13831a8..e6ddc91cc537a54e49ef9237f4daccab8bf2987c 100644 (file)
@@ -7,3 +7,11 @@ but right now I have to have a look at the content, which I don't like so much.
 Is there a better hook to use for this? I need to transform the input before preprocessing.
 
 [[DavidBremner]] 
+
+>You can check the type of the page without having to look at the content of the page:
+
+    my $page_file=$pagesources{$page};
+    my $page_type=pagetype($page_file);
+
+>Then you can check whether `$page_type` is "tex".
+>--[[KathrynAndersen]]