Overview
Comment:Fix skriv rendering issue
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: cee432377f259609fc1c8200f293c5dc2656622b103e9267d0198a1b0531a774
User & Date: bohwaz on 2021-05-20 18:26:07
Other Links: manifest | tags
Context
2021-05-20
21:39
Bump version check-in: 83eb4346de user: bohwaz tags: trunk, stable, 1.1.6
18:26
Fix skriv rendering issue check-in: cee432377f user: bohwaz tags: trunk, stable
18:06
Ditch ParsedownExtra and use our own footnotes implementation as ParsedownExtra is buggy and we only need footnotes check-in: 1116ef5677 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Template.php from [fbe9a25cda] to [7374ce76d8].

94
95
96
97
98
99
100
101

102
103
104
105
106
107
108
		$this->register_modifier('dump', ['KD2\ErrorManager', 'dump']);
		$this->register_modifier('get_country_name', ['Garradin\Utils', 'getCountryName']);
		$this->register_modifier('format_tel', [$this, 'formatPhoneNumber']);
		$this->register_modifier('abs', 'abs');
		$this->register_modifier('display_champ_membre', [$this, 'displayChampMembre']);

		$this->register_modifier('format_skriv', function ($str) {
			return Skriv::render(null, (string) $str);

		});

		foreach (CommonModifiers::MODIFIERS_LIST as $key => $name) {
			$this->register_modifier(is_int($key) ? $name : $key, is_int($key) ? [CommonModifiers::class, $name] : $name);
		}

		foreach (CommonModifiers::FUNCTIONS_LIST as $key => $name) {







|
>







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
		$this->register_modifier('dump', ['KD2\ErrorManager', 'dump']);
		$this->register_modifier('get_country_name', ['Garradin\Utils', 'getCountryName']);
		$this->register_modifier('format_tel', [$this, 'formatPhoneNumber']);
		$this->register_modifier('abs', 'abs');
		$this->register_modifier('display_champ_membre', [$this, 'displayChampMembre']);

		$this->register_modifier('format_skriv', function ($str) {
			$skriv = new Skriv(null);
			return $skriv->render((string) $str);
		});

		foreach (CommonModifiers::MODIFIERS_LIST as $key => $name) {
			$this->register_modifier(is_int($key) ? $name : $key, is_int($key) ? [CommonModifiers::class, $name] : $name);
		}

		foreach (CommonModifiers::FUNCTIONS_LIST as $key => $name) {