Skip to content

Commit

Permalink
fix(generator) invalid javadoc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Jun 5, 2024
1 parent a3e72ce commit 1ab538a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 3
- name: Download JDK
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 3
fetch-tags: true
Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
LWJGL_BUILD_ARCH: ${{matrix.ARCH}}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 3
- name: Install dependencies
Expand Down Expand Up @@ -322,7 +322,7 @@ jobs:
shell: cmd
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 3
- name: Configure MSVC
Expand All @@ -334,9 +334,9 @@ jobs:
if: contains(matrix.ARCH, 'arm') != true
- name: Install dependencies
run: |
Invoke-WebRequest https://cdn.azul.com/zulu/bin/zulu8.72.0.17-ca-fx-jdk8.0.382-win_x64.zip -OutFile jdk.zip
Invoke-WebRequest https://cdn.azul.com/zulu/bin/zulu8.78.0.19-ca-jdk8.0.412-win_x64.zip -OutFile jdk.zip
Expand-Archive -Path jdk.zip -DestinationPath .\
Rename-Item zulu8.72.0.17-ca-fx-jdk8.0.382-win_x64 jdk8
Rename-Item zulu8.78.0.19-ca-jdk8.0.412-win_x64 jdk8
shell: pwsh
- name: Restore kotlinc output
uses: actions/cache/restore@v3
Expand All @@ -354,9 +354,9 @@ jobs:
- name: Switch to x86 JDK
run: |
Remove-Item -Recurse jdk8
Invoke-WebRequest https://cdn.azul.com/zulu/bin/zulu8.72.0.17-ca-fx-jdk8.0.382-win_i686.zip -OutFile jdk.zip
Invoke-WebRequest https://cdn.azul.com/zulu/bin/zulu8.78.0.19-ca-jdk8.0.412-win_i686.zip -OutFile jdk.zip
Expand-Archive -Path jdk.zip -DestinationPath .\
Rename-Item zulu8.72.0.17-ca-fx-jdk8.0.382-win_i686 jdk8
Rename-Item zulu8.78.0.19-ca-jdk8.0.412-win_i686 jdk8
shell: pwsh
if: matrix.ARCH == 'x86'
- name: Build native
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,13 @@ private val CODE_BLOCK_ESCAPE_PATTERN = "^".toRegex(RegexOption.MULTILINE) // li
private val CODE_BLOCK_TAB_PATTERN = "\t".toRegex() // tabs

/** Useful for pre-formatted code blocks. HTML markup is not allowed and will be escaped. */
fun codeBlock(code: String) = """<pre><code>
fun codeBlock(code: String, javadocBlock: Boolean = false) = """<pre>${if (javadocBlock) "{@code" else "<code>"}
${code
.htmlEscaped
.replace(CODE_BLOCK_TRIM_PATTERN, "") // ...trim
.replace(CODE_BLOCK_ESCAPE_PATTERN, "\uFFFF") // ...escape
.replace(CODE_BLOCK_TAB_PATTERN, " ") // ...replace with 4 spaces for consistent formatting.
}</code></pre>"""
}${if (javadocBlock) "}" else "</code>"}</pre>"""

fun note(content: String) = "<div style=\"margin-left: 26px; border-left: 1px solid gray; padding-left: 14px;\"><h5>Note</h5>\n$content</div>"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ public static SharedLibrary getLibrary() {
* {@code Component}'s rectangle. If the window the {@code Component} belongs to has a {@code CALayer} attached to it, this layer will be accessible via
* the {@code windowLayer} property.</p>
*
* <pre><code>
* <pre>{@code
* @protocol JAWT_SurfaceLayers
* @property (readwrite, retain) CALayer *layer;
* @property (readonly) CALayer *windowLayer;
* @end </code></pre>
* @end}</pre>
*/
public static final int JAWT_MACOSX_USE_CALAYER = 0x80000000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jboolean success = JAWT_GetAWT(env, &awt);""")}
@protocol JAWT_SurfaceLayers
@property (readwrite, retain) CALayer *layer;
@property (readonly) CALayer *windowLayer;
@end """)}
@end""", javadocBlock = true)}
""",

"MACOSX_USE_CALAYER"..0x80000000.i
Expand Down

0 comments on commit 1ab538a

Please sign in to comment.