1<?php 2 3namespace dokuwiki\Parsing\ParserMode; 4 5/** 6 * GFM fenced code block with tilde fences: ~~~...~~~ 7 * 8 * Tildes map to DokuWiki's `<file>` flavor — same rendering pipeline as 9 * `code` but carries "this is a downloadable file" semantics. Markdown 10 * authors pick the flavor by choosing the fence character. 11 * 12 * Unlike backtick fences, tilde info strings may contain any non-newline 13 * character (spec example 116). 14 */ 15class GfmFile extends GfmCode 16{ 17 /** @inheritdoc */ 18 protected $type = 'file'; 19 20 /** @inheritdoc */ 21 protected $fenceChar = '~'; 22 23 /** @inheritdoc */ 24 protected $infoClass = '[^\n]*'; 25 26 /** @inheritdoc */ 27 public function getSort() 28 { 29 return 210; 30 } 31 32 /** @inheritdoc */ 33 protected function getModeName(): string 34 { 35 return 'gfm_file'; 36 } 37} 38