Condense embedded formulas.
Bookmaker delimits formulas and equations to allow
representing variables and symbols without tripping
up reference lookup, spell checking, and comment
generation.
Before, formulas were represented with:
some text
#Formula
(x + y, 0)
##
, and more text
This made it difficult to know when spacing should
be preserved before and after the formula. Now,
formulas are represented with:
some text #Formula # (x + y, 0) ##, and more text
The presence or absence of a space between ## and ,
is now significant (before it was not).
Also, formulas are bracketed by <code> in markdown
generation, so that variables stand out better.
See:
https://skia.org/user/api/SkBlendMode_Reference?cl=152781#Dst_Out
for an example.
Also fixed 100 column offenders and added a code
check to identify them. For the moment, 100 column
offenders are outed with SkDebugf but their presence
does not cause bookmaker to fail.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=152781
Bug: skia:6898
Change-Id: If92a65a234f5d616bf4485984a8d219a6f04821a
Reviewed-on: https://skia-review.googlesource.com/152781
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
diff --git a/docs/SkPoint_Reference.bmh b/docs/SkPoint_Reference.bmh
index 598f963..86a7910 100644
--- a/docs/SkPoint_Reference.bmh
+++ b/docs/SkPoint_Reference.bmh
@@ -672,11 +672,7 @@
#Method void operator+=(const SkVector& v)
#Line # adds Vector to Point ##
-Adds Vector v to Point. Sets Point to:
-#Formula
-(fX + v.fX, fY + v.fY)
-##
-.
+Adds Vector v to Point. Sets Point to: #Formula # (fX + v.fX, fY + v.fY) ##.
#Param v Vector to add ##
@@ -706,11 +702,7 @@
#Method void operator-=(const SkVector& v)
#Line # subtracts Vector from Point ##
-Subtracts Vector v from Point. Sets Point to:
-#Formula
-(fX - v.fX, fY - v.fY)
-##
-.
+Subtracts Vector v from Point. Sets Point to: #Formula # (fX - v.fX, fY - v.fY) ##.
#Param v Vector to subtract ##
@@ -773,11 +765,7 @@
#Method SkPoint& operator*=(SkScalar scale)
#Line # multiplies Point by scale factor ##
-Multiplies Point by scale. Sets Point to:
-#Formula
-(fX * scale, fY * scale)
-##
-.
+Multiplies Point by scale. Sets Point to: #Formula # (fX * scale, fY * scale) ##.
#Param scale Scalar to multiply by ##
@@ -923,11 +911,7 @@
#Method SkVector operator-(const SkPoint& a, const SkPoint& b)
#Line # returns Vector between Points ##
-Returns Vector from b to a, computed as
-#Formula
-(a.fX - b.fX, a.fY - b.fY)
-##
-.
+Returns Vector from b to a, computed as #Formula # (a.fX - b.fX, a.fY - b.fY) ##.
Can also be used to subtract Vector from Point, returning Point.
Can also be used to subtract Vector from Vector, returning Vector.
@@ -963,10 +947,7 @@
#Line # returns Point offset by Vector ##
Returns Point resulting from Point a offset by Vector b, computed as:
-#Formula
-(a.fX + b.fX, a.fY + b.fY)
-##
-.
+#Formula # (a.fX + b.fX, a.fY + b.fY) ##.
Can also be used to offset Point b by Vector a, returning Point.
Can also be used to add Vector to Vector, returning Vector.