Closed chris-morgan closed 5 years ago
I might as well mention this case here too: a sibling property IsIndexedDBEnabled
is rendered incorrectly as is_indexed_dbenabled
rather than is_indexed_db_enabled
(the straightforward translation) or is_indexeddb_enabled
(which I’d mildly prefer, as a special case).
Thanks! There is currently no way to special case the conversion, and your second comment pointed out a flaw in the conversion that doesn't even relate to special cases. Having fixed that second issue, I have identified a few more names that are worth adding to a list of special cases:
_
between 3
and d
And also sometimes there are interface names contained in method names:
create_from_imedia_source
/create_from_imediasource
?create_memory_buffer_over_ibuffer
start_animation_with_ianimation_object
/start_animation_with_ianimationobject
?I've now implemented a much better heuristic for detecting and splitting words/numbers, and also added a list of exceptions which will be left intact as single words.
Specifically I have in mind “JavaScript” as in the
IsJavaScriptEnabled
property ofWindows.Web.UI.WebViewControlSettings
, which currently becomesis_java_script_enabled
but should rather beis_javascript_enabled
, that being idiomatic.I’m then vaguely guessing that there will be other special cases too. If there is already something in place for special-casing things, then this property should be added to it, and if not then such a capability should be added.