Not done with the new docs yet but here is some info about the new settings:
setSetting Method
The setSetting method allows you to set a setting value for the ParsedownExtended instance. It is designed to be chainable, allowing you to easily configure settings.
Method Signature
public function setSetting(string $settingName, $settingValue): self
Parameters
settingName (string): The name of the setting to be updated, specified in dot notation.
settingValue ($settingValue): The value to be set for the specified setting.
Return Value
The method returns the current instance of the ParsedownExtended class, which allows for method chaining.
Usage Examples
$Parsedown = new ParsedownExtended();
// Example 1: Updating a boolean setting 'code' to true
$Parsedown->setSetting('code', true);
// Example 2: Updating a boolean setting 'emphasis.subscript' to true
$Parsedown->setSetting('emphasis.subscript', true);
// Example 3: Updating a setting with an array value while preserving 'enabled'
$Parsedown->setSetting('math.block.delimiters', [
['left' => 'kk', 'right' => 'dd'],
['left' => '__', 'right' => '__']
]);
// Example 4: Updating a setting value with method chaining
$Parsedown
->setSetting('headings.allowed', ['h1', 'h2'])
->setSetting('links.enabled', true);
Not done with the new docs yet but here is some info about the new settings:
setSetting
MethodThe
setSetting
method allows you to set a setting value for the ParsedownExtended instance. It is designed to be chainable, allowing you to easily configure settings.Method Signature
Parameters
settingName
(string): The name of the setting to be updated, specified in dot notation.settingValue
($settingValue): The value to be set for the specified setting.Return Value
The method returns the current instance of the
ParsedownExtended
class, which allows for method chaining.Usage Examples