1<?php 2 3namespace ComboStrap; 4 5/** 6 * The tag that wraps code or output 7 * 8 * Should output the `samp` tag ? 9 * https://getbootstrap.com/docs/5.0/content/reboot/#sample-output 10 */ 11class PrismTags 12{ 13 14 /** 15 * The tag of the ui component 16 */ 17 public const CONSOLE_TAG = "console"; 18 /** 19 * Enable or disable the file component 20 */ 21 public const CONF_FILE_ENABLE = 'fileEnable'; 22 /** 23 * The tag of the ui component 24 */ 25 public const FILE_TAG = "file"; 26 27 public static function handleExit(\Doku_Handler $handler): array 28 { 29 /** 30 * Tag Attributes are passed 31 * because it's possible to not display a code with the display attributes = none 32 */ 33 $callStack = CallStack::createFromHandler($handler); 34 Dimension::addScrollToggleOnClickIfNoControl($callStack); 35 36 $callStack->moveToEnd(); 37 $openingTag = $callStack->moveToPreviousCorrespondingOpeningCall(); 38 return array(PluginUtility::ATTRIBUTES => $openingTag->getAttributes()); 39 } 40 41 public static function processEnterXhtml(TagAttributes $attributes, \DokuWiki_Syntax_Plugin $plugin, \Doku_Renderer_xhtml $renderer) 42 { 43 Prism::htmlEnter($renderer, $plugin, $attributes); 44 } 45 46 public static function processExitXhtml(TagAttributes $attributes, \Doku_Renderer_xhtml $renderer) 47 { 48 Prism::htmlExit($renderer, $attributes); 49 } 50} 51