本文整理汇总了PHP中GeSHi::set_use_language_tab_width方法的典型用法代码示例。如果您正苦于以下问题:PHP GeSHi::set_use_language_tab_width方法的具体用法?PHP GeSHi::set_use_language_tab_width怎么用?PHP GeSHi::set_use_language_tab_width使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeSHi
的用法示例。
在下文中一共展示了GeSHi::set_use_language_tab_width方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$geshi->set_header_type(GESHI_HEADER_PRE_TABLE);
//$geshi->set_header_type(GESHI_HEADER_NONE);
//===
// Select the line number method
if ($lineNumbers == "true") {
$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
//$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 5);
} else {
$geshi->enable_line_numbers(GESHI_NO_LINE_NUMBERS);
}
//===
// Set where to start counting line numbers from
$geshi->start_line_numbers_at((int) $startLine);
//===
// Set the tab processing (only used for non-pre header types)
$geshi->set_use_language_tab_width(true);
$geshi->set_tab_width(4);
//===
// Set the base styles
initGeshiStyles($geshi);
//===
// Set the header and footer
// Note: As of this moment the footer doesn't seem to work right with the table
// output format so we are leaving it empty.
$geshi->set_header_content($codeHeader);
$geshi->set_footer_content('');
//===
// Process the code
$highlightedCode = $geshi->parse_code();
//===
// Note: The old InsertCode plugin did some extra adjustments to the output string