Possibly unexpected behaviour from ranged milestones with paragraph styles
@davidg-sil is already working on this.
Since Mar 16, 2023.
- Dominant language
- Python
- Stars
- 33
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
The paragraph spacing, etc. in-force at the end of a paragraph are what governs the layout.
I.e. the starting state of a paragraph is irrelevant, only the final state.
This means that a \p that contains a milestone that alters a paragraph style will be affected by that style, even if it is the very last thing in the paragraph. I.e. while the character styling effects are different, in terms of paragraph styling these are equivalent:
\p \zright-s\* [.....] , \p [.....] \zright-s \* [.......] and \p [...............] \zright-s\*
This in turn means that
\p [text]
\zright-s\*
\p I expect just this line to be right
\p And this one.
\zright-e\*
Will not do what the user expects. What will happen is that the preceding paragraph will be set right, along with unless there are \ps added before the milestone start and ends.
A solution to this might be to use futurelet to scan ahead, and if the next non-space item is going to be a paragraph mark, to end the current paragraph before the milestone comes into effect. This could be made more efficient if there was a private/internal parameter defined for the milestone that said whether this milestone caused paragraph changes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.