background
I run drush cget markdown.settings
and see:
dependencies:
module:
- markdown
parser:
id: michelf/php-markdown-extra
render_strategy:
type: none
settings:
code_attr_on_pre: false
code_class_prefix: ''
empty_element_suffix: ' />'
enhanced_ordered_list: true
fn_backlink_class: footnote-backref
fn_backlink_html: '↩︎'
fn_backlink_label: ''
fn_backlink_title: ''
fn_id_prefix: ''
fn_link_class: footnote-ref
fn_link_title: ''
hard_wrap: false
hashtag_protection: false
no_entities: false
no_markup: false
omit_footnotes: false
predef_abbr: { }
predef_titles: { }
predef_urls: { }
tab_width: 4
table_align_class_tmpl: ''
I visit https://drupal8.example.org/admin/config/content/markdown
In the "Parser" tab, I select CommonMark (1.5.3)
.
In the "Render Strategy" tab, I select Filter Output
.
I save the changes.
I run drush cget markdown.settings
and see:
dependencies:
module:
- markdown
parser:
id: league/commonmark
render_strategy:
type: filter_output
allowed_html: '<a href hreflang> <abbr> <blockquote cite> <br> <cite> <code> <div> <em> <h2> <h3> <h4> <h5> <h6> <hr> <img alt height src width> <li> <ol start type=''1 A I''> <p> <pre> <span> <strong> <ul type>'
plugins:
- markdown
- bootstrap
settings:
allow_unsafe_links: true
enable_em: true
enable_strong: true
html_input: allow
max_nesting_level: 0
renderer:
block_separator: \n
inner_separator: \n
soft_break: \n
unordered_list_markers:
- '-'
- '*'
- +
use_asterisk: true
use_underscore: true
Notice that parser.render_strategy.allowed_html
and parser.render_strategy.plugins
were added and that parser.settings
has changed, even though I did not edit them in the web UI.
I revert the changes by visiting: https://drupal8.example.org/admin/config/content/markdown
In the "Parser" tab, I select PHP Markdown Extra (1.9.0)
.
In the "Render Strategy" tab, I select None
.
I save the changes.
I run drush cget markdown.settings
and see the original settings:
dependencies:
module:
- markdown
parser:
id: michelf/php-markdown-extra
render_strategy:
type: none
settings:
code_attr_on_pre: false
code_class_prefix: ''
empty_element_suffix: ' />'
enhanced_ordered_list: true
fn_backlink_class: footnote-backref
fn_backlink_html: '↩︎'
fn_backlink_label: ''
fn_backlink_title: ''
fn_id_prefix: ''
fn_link_class: footnote-ref
fn_link_title: ''
hard_wrap: false
hashtag_protection: false
no_entities: false
no_markup: false
omit_footnotes: false
predef_abbr: { }
predef_titles: { }
predef_urls: { }
tab_width: 4
table_align_class_tmpl: ''
Notice that parser.render_strategy.allowed_html
and parser.render_strategy.plugins
were removed and that parser.settings
has changed back, even though I did not edit them in the web UI.
the problem
However, these associated changes do not happen if I change with drush:
$ drush cset markdown.settings parser.id league/commonmark
$ drush cset markdown.settings parser.render_strategy.type filter_output
$ drush cget markdown.settings
dependencies:
module:
- markdown
parser:
id: league/commonmark
render_strategy:
type: filter_output
settings:
code_attr_on_pre: false
code_class_prefix: ''
empty_element_suffix: ' />'
enhanced_ordered_list: true
fn_backlink_class: footnote-backref
fn_backlink_html: '↩︎'
fn_backlink_label: ''
fn_backlink_title: ''
fn_id_prefix: ''
fn_link_class: footnote-ref
fn_link_title: ''
hard_wrap: false
hashtag_protection: false
no_entities: false
no_markup: false
omit_footnotes: false
predef_abbr: { }
predef_titles: { }
predef_urls: { }
tab_width: 4
table_align_class_tmpl: ''
$
In particular, notice that parser.render_strategy.allowed_html
and parser.render_strategy.plugins
were not added and that parser.settings
has not changed.
Using the web UI, these associated changes do not have to be specified explicitly.
Is there a way to make similar under-specified config changes by cli?
For clarification, I use drush
simply as an example of a cli. Using other non-interactive commandline tools would be fine.