mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
Don't use *
in links
This commit is contained in:
parent
5a10a92983
commit
57b05e01b4
@ -391,6 +391,7 @@ fun file(path: String): File {
|
||||
fun String.cleanup(): String {
|
||||
return this
|
||||
.cleanupElementLinks()
|
||||
.fixWildcardLinks()
|
||||
.removeAttributeLinks()
|
||||
.removeDocProviderSpecificAttributes()
|
||||
.internalizeLinks()
|
||||
@ -401,6 +402,12 @@ fun String.cleanupElementLinks(): String {
|
||||
return replace("](#element:", "](#")
|
||||
}
|
||||
|
||||
fun String.fixWildcardLinks(): String {
|
||||
// reason: Writerside can't handle links with * and the error page is displayed
|
||||
// [wildcard](path__to__*) -> [wildcard](#path__to__-)
|
||||
return replace("__*", "__-")
|
||||
}
|
||||
|
||||
fun String.removeAttributeLinks(): String {
|
||||
val attributeLinkRegex = Regex("\\[([^\\[\\]]*?)]\\(#attribute:.*?\\)")
|
||||
return attributeLinkRegex.replace(this) { matchResult ->
|
||||
|
@ -52,7 +52,7 @@ Deprecated elements are omitted in the list below.
|
||||
- [`<depends>`](#idea-plugin__depends)
|
||||
- [`<incompatible-with>`](#idea-plugin__incompatible-with)
|
||||
- [`<extensions>`](#idea-plugin__extensions)
|
||||
- [An Extension](#idea-plugin__extensions__*)
|
||||
- [An Extension](#idea-plugin__extensions__-)
|
||||
- [`<extensionPoints>`](#idea-plugin__extensionPoints)
|
||||
- [`<extensionPoint>`](#idea-plugin__extensionPoints__extensionPoint)
|
||||
- [`<with>`](#idea-plugin__extensionPoints__extensionPoint__with)
|
||||
@ -568,7 +568,7 @@ Examples
|
||||
```
|
||||
|
||||
#### An Extension
|
||||
{#idea-plugin__extensions__*}
|
||||
{#idea-plugin__extensions__-}
|
||||
|
||||
An extension instance registered under [`<extensions>`](#idea-plugin__extensions).
|
||||
|
||||
|
@ -41,7 +41,7 @@ See [](explore_api.md) for more information and strategies.
|
||||
* If the extension point was declared using the `beanClass` attribute, set all properties annotated with the [`@Attribute`](%gh-ic%/platform/util/src/com/intellij/util/xmlb/annotations/Attribute.java) and [`Tag`](%gh-ic%/platform/util/src/com/intellij/util/xmlb/annotations/Tag.java) annotations in the specified bean class.
|
||||
|
||||
See the [](plugin_extension_points.md#declaring-extension-points) section for details.
|
||||
4. In addition to attributes defined by the extension point, the extension element can specify basic attributes (see the attributes list in [](plugin_configuration_file.md#idea-plugin__extensions__*) section).
|
||||
4. In addition to attributes defined by the extension point, the extension element can specify basic attributes (see the attributes list in [](plugin_configuration_file.md#idea-plugin__extensions__-) section).
|
||||
5. Implement the extension API as required (see [](#implementing-extension)).
|
||||
|
||||
</procedure>
|
||||
|
Loading…
x
Reference in New Issue
Block a user