[ffigen] Update readme (#104)
Fixed code block indentation issue in configuration table.
diff --git a/pkgs/ffigen/CHANGELOG.md b/pkgs/ffigen/CHANGELOG.md
index 2c2b156..2ae8d46 100644
--- a/pkgs/ffigen/CHANGELOG.md
+++ b/pkgs/ffigen/CHANGELOG.md
@@ -1,3 +1,6 @@
+# 1.0.2
+- Fix indentation for pub's readme.
+
# 1.0.1
- Fixed generation of `NativeFunction` parameters instead of `Pointer<NativeFunction>` in type signatures.
diff --git a/pkgs/ffigen/README.md b/pkgs/ffigen/README.md
index 20ff335..4c5f335 100644
--- a/pkgs/ffigen/README.md
+++ b/pkgs/ffigen/README.md
@@ -80,12 +80,19 @@
<tr>
<td>output<br><i>(Required)</i></td>
<td>Output path of the generated bindings.</td>
- <td><pre lang="yaml">output: 'generated_bindings.dart'</pre></td>
+ <td>
+
+```yaml
+output: 'generated_bindings.dart'
+```
+ </td>
</tr>
<tr>
<td>headers<br><i>(Required)</i></td>
<td>The header entry-points and include-directives. Glob syntax is allowed.</td>
- <td><pre lang="yaml">
+ <td>
+
+```yaml
headers:
entry-points:
- 'folder/**.h'
@@ -94,27 +101,45 @@
- '**index.h'
- '**/clang-c/**'
- '/full/path/to/a/header.h'
- </pre></td>
+```
+ </td>
</tr>
<tr>
<td>name<br><i>(Prefer)</i></td>
<td>Name of generated class.</td>
- <td><pre lang="yaml">name: 'SQLite'</pre></td>
+ <td>
+
+```yaml
+name: 'SQLite'
+```
+ </td>
</tr>
<tr>
<td>description<br><i>(Prefer)</i></td>
<td>Dart Doc for generated class.</td>
- <td><pre lang="yaml">description: 'Bindings to SQLite'</pre></td>
+ <td>
+
+```yaml
+description: 'Bindings to SQLite'
+```
+ </td>
</tr>
<tr>
<td>compiler-opts</td>
<td>Pass compiler options to clang.</td>
- <td><pre lang="yaml">compiler-opts: '-I/usr/lib/llvm-9/include/'</pre></td>
+ <td>
+
+```yaml
+compiler-opts: '-I/usr/lib/llvm-9/include/'
+```
+ </td>
</tr>
<tr>
<td>functions<br>structs<br>enums<br>unnamed-enums<br>macros</td>
<td>Filters for declarations.<br><b>Default: all are included</b></td>
- <td><pre lang="yaml">
+ <td>
+
+```yaml
functions:
include: # 'exclude' is also available.
- [a-z][a-zA-Z0-9]* # Matches using regexp.
@@ -136,14 +161,20 @@
'CXTypeKind': # Full names have higher priority.
# $1 keeps only the 1st group i.e '(.*)'.
'CXType(.*)': '$1'
- </pre></td>
+```
+ </td>
</tr>
<tr>
<td>array-workaround</td>
<td>Should generate workaround for fixed arrays in Structs. See <a href="#array-workaround">Array Workaround</a><br>
<b>Default: false</b>
</td>
- <td><pre lang="yaml">array-workaround: true</pre></td>
+ <td>
+
+```yaml
+array-workaround: true
+```
+ </td>
</tr>
<tr>
<td>comments</td>
@@ -154,41 +185,63 @@
If you want to disable all comments you can also pass<br>
comments: false.
</td>
- <td><pre lang="yaml">
+ <td>
+
+```yaml
comments:
style: doxygen
length: full
- </pre></td>
+```
+ </td>
</tr>
<tr>
<td>sort</td>
<td>Sort the bindings according to name.<br>
<b>Default: false</b>, i.e keep the order as in the source files.
</td>
- <td><pre lang="yaml">sort: true</pre></td>
+ <td>
+
+```yaml
+sort: true
+```
+ </td>
</tr>
<tr>
<td>use-supported-typedefs</td>
<td>Should automatically map typedefs, E.g uint8_t => Uint8, int16_t => Int16 etc.<br>
<b>Default: true</b>
</td>
- <td><pre lang="yaml">use-supported-typedefs: true</pre></td>
+ <td>
+
+```yaml
+use-supported-typedefs: true
+```
+ </td>
</tr>
<tr>
<td>dart-bool</td>
<td>Should generate dart `bool` for c99 bool in functions.<br>
<b>Default: true</b>
</td>
- <td><pre lang="yaml">dart-bool: true</pre></td>
+ <td>
+
+```yaml
+dart-bool: true
+```
+ </td>
</tr>
<tr>
<td>preamble</td>
<td>Raw header of the file, pasted as-it-is.</td>
- <td><pre lang="yaml">
+ <td>
+
+```yaml
preamble: |
/// AUTO GENERATED FILE, DO NOT EDIT.
///
- /// Generated by `package:ffigen`.</pre></td>
+ /// Generated by `package:ffigen`.
+```
+</td>
</tr>
<tr>
<td>size-map</td>
@@ -196,7 +249,9 @@
<b>The defaults (see example) <i>may</i> not be portable on all OS.
Do not change these unless absolutely sure.</b>
</td>
- <td><pre lang="yaml">
+ <td>
+
+```yaml
# These are optional and also default,
# Omitting any and the default will be used.
size-map:
@@ -210,7 +265,9 @@
unsigned long: 8
long long: 8
unsigned long long: 8
- enum: 4</pre></td>
+ enum: 4
+```
+ </td>
</tr>
</tbody>
</table>
diff --git a/pkgs/ffigen/pubspec.yaml b/pkgs/ffigen/pubspec.yaml
index fa95439..04ca960 100644
--- a/pkgs/ffigen/pubspec.yaml
+++ b/pkgs/ffigen/pubspec.yaml
@@ -3,7 +3,7 @@
# BSD-style license that can be found in the LICENSE file.
name: ffigen
-version: 1.0.1
+version: 1.0.2
homepage: https://github.com/dart-lang/ffigen
description: Experimental generator for FFI bindings, using LibClang to parse C header files.