asciidoctor 2.2.0-rc.3 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/types/index.d.ts +20 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asciidoctor",
3
- "version": "2.2.0-rc.3",
3
+ "version": "2.2.1",
4
4
  "description": "A JavaScript AsciiDoc processor, cross-compiled from the Ruby-based AsciiDoc implementation, Asciidoctor, using Opal",
5
5
  "main": "index.js",
6
6
  "types": "types",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "scripts": {
12
12
  "test": "./bin/asciidoctor --version",
13
- "dist": "pkg bin/asciidoctor --out-path dist"
13
+ "dist": "pkg package.json --out-path dist"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">=8.11",
@@ -47,7 +47,7 @@
47
47
  "homepage": "https://github.com/asciidoctor/asciidoctor.js",
48
48
  "dependencies": {
49
49
  "@asciidoctor/cli": "3.4.0",
50
- "@asciidoctor/core": "2.2.0-rc.3"
50
+ "@asciidoctor/core": "2.2.1"
51
51
  },
52
52
  "devDependencies": {
53
53
  "pkg": "^4.4.7"
package/types/index.d.ts CHANGED
@@ -1971,14 +1971,32 @@ export namespace Asciidoctor {
1971
1971
  * block.title // "Foo 3^ # {two-colons} Bar(1)"
1972
1972
  * block.getTitle(); // "Foo 3^ # :: Bar(1)"
1973
1973
  */
1974
- getTitle(): string;
1974
+ getTitle(): string|undefined;
1975
1975
 
1976
1976
  /**
1977
1977
  * Set the String block title.
1978
1978
  * @param title - The document title
1979
1979
  * @returns returns the new String title assigned to this Block.
1980
1980
  */
1981
- setTitle(title: string): string;
1981
+ setTitle(title: string|undefined): string;
1982
+
1983
+ /**
1984
+ * Generate and assign caption to block if not already assigned.
1985
+ *
1986
+ * If the block has a title and a caption prefix is available for this block,
1987
+ * then build a caption from this information, assign it a number and store it
1988
+ * to the caption attribute on the block.
1989
+ *
1990
+ * If a caption has already been assigned to this block, do nothing.
1991
+ *
1992
+ * The parts of a complete caption are: <prefix> <number>. <title>
1993
+ * This partial caption represents the part the precedes the title.
1994
+ *
1995
+ * @param value - the String caption to assign to this block or nil to use document attribute.
1996
+ * @param captionContext - the String context to use when resolving caption-related attributes.
1997
+ * If not provided, the name of the context for this block is used. Only certain contexts allow the caption to be looked up.
1998
+ */
1999
+ assignCaption(value?: string, captionContext?: string): void;
1982
2000
 
1983
2001
  /**
1984
2002
  * Convenience method that returns the interpreted title of the Block