Skip to content

Commit c8e151d

Browse files
authored
Fix markup in generated gtk-doc (#4149)
* Fix markup in generated gtk-doc Resolves: #3336. * Cleanup a bit * Convert ASCII-art tables back to HTML This reverts commit 5984718 and 870f9e5.
1 parent e7c1ade commit c8e151d

File tree

3 files changed

+72
-41
lines changed

3 files changed

+72
-41
lines changed

doc/meson.build

+8-12
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private_libvips_headers = [
5151

5252
private_headers = []
5353
foreach private_libvips_header : private_libvips_headers
54-
private_headers += [join_paths(project_source_root, 'libvips', private_libvips_header)]
54+
private_headers += [project_source_root / 'libvips' / private_libvips_header]
5555
endforeach
5656

5757
markdown_content_files = files(
@@ -73,7 +73,7 @@ if pandoc.found()
7373
output: '@BASENAME@.xml',
7474
arguments: [
7575
'@INPUT@',
76-
'--template=@0@'.format(join_paths(meson.current_source_dir(), 'pandoc-docbook-template.docbook')),
76+
'--template=@0@'.format(meson.current_source_dir() / 'pandoc-docbook-template.docbook'),
7777
'--wrap=none',
7878
'-V', 'title=@BASENAME@',
7979
'-f', 'markdown+smart',
@@ -134,25 +134,21 @@ version_xml = configure_file(
134134
)
135135

136136
glib_prefix = glib_dep.get_variable(pkgconfig: 'prefix')
137-
glib_docpath = glib_prefix / 'share' / 'gtk-doc' / 'html'
138137
docpath = get_option('prefix') / get_option('datadir') / 'gtk-doc' / 'html'
139138

140139
gnome.gtkdoc('libvips',
141-
mode: 'none',
142140
main_xml: 'libvips-docs.xml',
143-
src_dir: [
144-
join_paths(project_source_root, 'libvips'),
145-
join_paths(project_build_root, 'libvips'),
146-
],
141+
namespace: 'vips',
142+
src_dir: 'libvips',
147143
dependencies: libvips_dep,
148144
ignore_headers: private_headers,
149-
scan_args: '--rebuild-types',
145+
scan_args: [ '--rebuild-types' ],
150146
mkdb_args: [ '--default-includes=vips/vips.h' ],
151147
fixxref_args: [
152148
'--html-dir=@0@'.format(docpath),
153-
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
154-
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
155-
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
149+
'--extra-dir=@0@'.format(glib_prefix / gnome.gtkdoc_html_dir('glib')),
150+
'--extra-dir=@0@'.format(glib_prefix / gnome.gtkdoc_html_dir('gobject')),
151+
'--extra-dir=@0@'.format(glib_prefix / gnome.gtkdoc_html_dir('gio')),
156152
],
157153
content_files: [ content_files, markdown_content_files_docbook, version_xml ],
158154
expand_content_files: [ content_files ],

libvips/create/buildlut.c

+38-20
Original file line numberDiff line numberDiff line change
@@ -284,29 +284,47 @@ vips_buildlut_init(VipsBuildlut *lut)
284284
*
285285
* For example, consider this 2 x 2 matrix of (x, y) coordinates:
286286
*
287-
* |[
288-
* |-------|-------|
289-
* | 0 | 0 |
290-
* |-------|-------|
291-
* | 255 | 100 |
292-
* |-------|-------|
293-
* ]|
287+
* <tgroup cols='2' align='left' colsep='1' rowsep='1'>
288+
* <tbody>
289+
* <row>
290+
* <entry>0</entry>
291+
* <entry>0</entry>
292+
* </row>
293+
* <row>
294+
* <entry>255</entry>
295+
* <entry>100</entry>
296+
* </row>
297+
* </tbody>
298+
* </tgroup>
294299
*
295300
* We then generate a 1 x 256 element LUT like this:
296301
*
297-
* |[
298-
* |-------|-------|
299-
* | Index | Value |
300-
* |-------|-------|
301-
* | 0 | 0 |
302-
* |-------|-------|
303-
* | 1 | 0.4 |
304-
* |-------|-------|
305-
* | etc. | 0.4 |
306-
* |-------|-------|
307-
* | 255 | 100 |
308-
* |-------|-------|
309-
* ]|
302+
* <tgroup cols='2' align='left' colsep='1' rowsep='1'>
303+
* <thead>
304+
* <row>
305+
* <entry>Index</entry>
306+
* <entry>Value</entry>
307+
* </row>
308+
* </thead>
309+
* <tbody>
310+
* <row>
311+
* <entry>0</entry>
312+
* <entry>0</entry>
313+
* </row>
314+
* <row>
315+
* <entry>1</entry>
316+
* <entry>0.4</entry>
317+
* </row>
318+
* <row>
319+
* <entry>etc.</entry>
320+
* <entry>0.4</entry>
321+
* </row>
322+
* <row>
323+
* <entry>255</entry>
324+
* <entry>100</entry>
325+
* </row>
326+
* </tbody>
327+
* </tgroup>
310328
*
311329
* This is then written as the output image, with the left column giving the
312330
* index in the image to place the value.

libvips/create/invertlut.c

+26-9
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,32 @@ vips_invertlut_init(VipsInvertlut *lut)
321321
*
322322
* Eg. input like this:
323323
*
324-
* |[
325-
* |-------|-------|-------|-------|
326-
* | 0.1 | 0.2 | 0.3 | 0.1 |
327-
* |-------|-------|-------|-------|
328-
* | 0.2 | 0.4 | 0.4 | 0.2 |
329-
* |-------|-------|-------|-------|
330-
* | 0.7 | 0.5 | 0.6 | 0.3 |
331-
* |-------|-------|-------|-------|
332-
* ]|
324+
* <tgroup cols='4' align='left' colsep='1' rowsep='1'>
325+
* <tbody>
326+
* <row>
327+
* <entry>4</entry>
328+
* <entry>3</entry>
329+
* </row>
330+
* <row>
331+
* <entry>0.1</entry>
332+
* <entry>0.2</entry>
333+
* <entry>0.3</entry>
334+
* <entry>0.1</entry>
335+
* </row>
336+
* <row>
337+
* <entry>0.2</entry>
338+
* <entry>0.4</entry>
339+
* <entry>0.4</entry>
340+
* <entry>0.2</entry>
341+
* </row>
342+
* <row>
343+
* <entry>0.7</entry>
344+
* <entry>0.5</entry>
345+
* <entry>0.6</entry>
346+
* <entry>0.3</entry>
347+
* </row>
348+
* </tbody>
349+
* </tgroup>
333350
*
334351
* Means a patch with 10% reflectance produces an image with 20% in
335352
* channel 1, 30% in channel 2, and 10% in channel 3, and so on.

0 commit comments

Comments
 (0)