@antora/assembler 1.0.0-beta.11 → 1.0.0-beta.13

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.
@@ -814,13 +814,15 @@ function createResourceKey ({ component, version, module: mod, family, relative
814
814
  return `${version}@${component}:${mod === 'ROOT' ? '' : mod}:${family === 'page' ? '' : family + '$'}${relative}`
815
815
  }
816
816
 
817
- function generateId (componentSrc, componentVersion, coordinateSep, scopeSep, escapePass, fragment) {
817
+ function generateId (componentSrc, componentVersion, coordinateSep, scopeSep, asXrefTarget, fragment) {
818
818
  let { component, module: mod, relative } = componentSrc
819
819
  let id = relative.replace(/\.adoc$/, '').replace(/[/.]/g, '-')
820
820
  if (component !== componentVersion.name) {
821
821
  id = [component, mod === 'ROOT' ? '' : mod, id].join(coordinateSep)
822
822
  } else if (mod !== 'ROOT') {
823
- if (escapePass && coordinateSep === ':' && /(?:pass|stem)$/.test(mod)) mod = mod.replace(/(?:pass|stem)$/, '\\$&')
823
+ if (asXrefTarget && coordinateSep === ':' && /(?:pass|stem)$/.test(mod) && /^[a-z]+(?:,[a-z-]+)*$/.test(id)) {
824
+ mod = mod.replace(/(?:pass|stem)$/, '\\$&')
825
+ }
824
826
  id = mod + coordinateSep + id
825
827
  } else if (ReservedIdNames.includes(id)) {
826
828
  id += scopeSep
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antora/assembler",
3
- "version": "1.0.0-beta.11",
3
+ "version": "1.0.0-beta.13",
4
4
  "description": "A JavaScript library that merges AsciiDoc content from multiple pages in an Antora site into assembly files and delegates to an exporter to convert those files to another format, such as PDF.",
5
5
  "license": "MPL-2.0",
6
6
  "author": "OpenDevise Inc. (https://opendevise.com)",