Skip to content

Commit

Permalink
Reflow improvements
Browse files Browse the repository at this point in the history
* Break line after sentence in parentheses.
* Do not end sentence on "etc."
  • Loading branch information
gmlueck committed Jul 20, 2024
1 parent fc9f81c commit 4bcc409
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10086,8 +10086,8 @@ allocation must be submitted to a <<queue>> that was constructed with the same
context that was used to allocate that memory.
The explicit memory operation <<command, commands>> that take USM pointers have
a similar restriction.
(See <<subsec:explicitmemory>> for details.) Violations of these requirements
result in undefined behavior.
(See <<subsec:explicitmemory>> for details.)
Violations of these requirements result in undefined behavior.

[NOTE]
====
Expand Down
4 changes: 2 additions & 2 deletions adoc/chapters/what_changed.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ The {cpp} attributes that decorate kernels are now better described, and their
position has changed so that they are applied directly to the kernel function.
(Previously, they were applied to a device function that the kernel calls, and
the implementation needed to propagate the information up to the enclosing
kernel.) The old {cpp} attribute form is no longer included in the SYCL
specification.
kernel.)
The old {cpp} attribute form is no longer included in the SYCL specification.

Changes to the built-in functions specified in <<sycl:builtins>>:

Expand Down
4 changes: 2 additions & 2 deletions adoc/scripts/reflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# A single letter followed by a period, typically a middle initial.
endInitial = re.compile(r'^[A-Z]\.$')
# An abbreviation, which does not (usually) end a line.
endAbbrev = re.compile(r'(e\.g|i\.e|c\.f|\bvs\b|\bco\b|\bltd\b|\bch\b)\.$', re.IGNORECASE)
endAbbrev = re.compile(r'(e\.g|i\.e|c\.f|\bvs\b|\bco\b|\bltd\b|\bch\b|\betc)\.$', re.IGNORECASE)

# Explicit Valid Usage list item with one or more leading asterisks
# The re.DOTALL is needed to prevent vuPat.search() from stripping
Expand Down Expand Up @@ -132,7 +132,7 @@ def endSentence(self, word):
- A single letter (if breakInitial is True)
- Abbreviations: 'c.f.', 'e.g.', 'i.e.' (or mixed-case versions)"""
if (word[-1:] != '.' or
if ((word[-1:] != '.' and word[-2:] != '.)') or
endAbbrev.search(word) or
(self.breakInitial and endInitial.match(word))):
return False
Expand Down

0 comments on commit 4bcc409

Please sign in to comment.