Wikka : OnegWRNoDefaultCodeClass

HomePage :: Categories :: Index :: Changes :: Comments :: Documentation :: Blog :: Login/Register

NoDefaultCodeClass Workaround

See Also
NOT Included in any Wikka version yet
Last edited by OnegWR:
Modified links pointing to docs server

What

Installation

Find this code (around 60%)
                        elseif (isset($language) && isset($wakka->config['wikka_formatter_path']) && file_exists($wikka_hi_path.'/'.$language.'.php') && 'wakka' != $language)
                        {
                                // use internal Wikka hilighter
                                $output = '<div class="code">'."\n";
                                $output .= $wakka->Format($code, $language);
                                $output .= "</div>\n";
                        }
                        // no language defined or no formatter found: make default code block;
                        // IncludeBuffered() will complain if 'code' formatter doesn't exist
                        else
                        {
                                $output = '<div class="code">'."\n";
                                $output .= $wakka->Format($code, 'code');
                                $output .= "</div>\n";
                        }

                        return $output;

And replace it with
                        elseif (isset($language) && isset($wakka->config['wikka_formatter_path']) && file_exists($wikka_hi_path.'/'.$language.'.php') && 'wakka' != $language)
                        {
                                // use internal Wikka hilighter
                                //$output = '<div class="code">'."\n";
                                $output = '<div>';                                            //only this line...
                                $output .= $wakka->Format($code, $language);
                                $output .= "</div>\n";
                        }
                        // no language defined or no formatter found: make default code block;
                        // IncludeBuffered() will complain if 'code' formatter doesn't exist
                        else
                        {
                                $output = '<div class="code">'."\n";
                                $output .= $wakka->Format($code, 'code');
                                $output .= "</div>\n";
                        }

                        return $output;

History


OnegWR
There are no comments on this page. [Add comment]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.2569 seconds