LightGuard / asciidoc-splitter

A splitter utility for helping create modular docs from chapter files.
BSD 2-Clause "Simplified" License
8 stars 8 forks source link

Verify that the splitter converts either `chap-` or `assembly-` prefix in anchor ID to `assembly-` #95

Closed sterobin closed 2 years ago

sterobin commented 2 years ago

@LightGuard I know for certain that today the splitter converts chap- to assembly- in anchor IDs, by design. Can we make sure that if someone just chooses to use the assembly- prefix upstream as well, that the splitter can just ignore it? Or convert it to the same value downstream? Basically, we need to be sure that people can use either of those prefixes upstream and have it turn out as assembly- downtream. We can't impose the strict requirement that prefixes must be chap-, only that prefixes can be chap-. Thus both should be supported.

LightGuard commented 2 years ago

Do you have a test case, or should I create one?

sterobin commented 2 years ago

I don't have one, sorry.

LightGuard commented 2 years ago

Okay, well, what are your expected outcomes?

sterobin commented 2 years ago

Just what I described above: Expected outcome is, if a user in source branch uses prefix chap- or assembly- in anchor IDs, either way it becomes assembly- prefix in target branch. Today the splitter already converts chap-, so just need to make sure it can support assembly-, in case people want it to be the same assembly- prefix in both the source and target branches (i.e., no change between the two).

So if prefix = chap- in source, convert to assembly- after split (which it already does today). If prefix = assembly- in source, keep it as assembly- after split (no change to it)

sterobin commented 2 years ago

Thank you @LightGuard !