You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Offer an appropriate place in settings to define new extractors via JSON schema.
Motivation
The existing hard-coded extractors are a fairly inflexible way to extend the system.
This would allow a non-TS system to extend
Design Ideas
add a mapping of RegExpForeignCodeExtractor.IOptions (plus a rank) to the right plugin's settings schema:
"definitions": {
"code-extractors": {
"type": "object",
"title": "Code Extractors",
"description": "descriptions of how to find other language blocks, keyed by host language",
"additionalProperties": {
"$ref": "#/definitions/host-code-extractors"
}
},
"host-code-extractors": {
"type": "object",
"descirption": "code extractors for a single host language, keyed by regular expression",
"additionalProperties": {
"$ref": "#/definitions/codeExtractor"
}
},
"code-extractor": {
"type": "object",
"properties": {
"language": {
"type": "string",
"description": "the guest language for the code that is extracted"
},
"...etc": {}
}
}
}
could be a/some new plugin(s), which exports an optional token to the core (so they can be disabled, for some reason)
I think the idea would be that some py (but non-js) package could put something in the settings conf.d location and have it "just work," even to replace existing ones.
Elevator Pitch
Offer an appropriate place in settings to define new extractors via JSON schema.
Motivation
The existing hard-coded extractors are a fairly inflexible way to extend the system.
This would allow a non-TS system to extend
Design Ideas
RegExpForeignCodeExtractor.IOptions
(plus arank
) to the right plugin's settings schema:With an example:
represented as:
🏓 @tonyfast
The text was updated successfully, but these errors were encountered: