1
0
mirror of https://github.com/golang/go synced 2024-11-05 19:46:11 -07:00
Commit Graph

4 Commits

Author SHA1 Message Date
Russ Cox
657575a564 present: record info in AST for reproducing present inputs
Commands like .code now have a TemplateCmd method
that returns the original command.

The Text struct now has a Raw field set when Pre==true.
It contains the original indented text, without the tab "fixing".

This helps building tooling that reformats or rewrites present files.

For golang/go#33955.

Change-Id: Ieb036e8b509a4531d120c597b19f2158306a5352
Reviewed-on: https://go-review.googlesource.com/c/tools/+/222845
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2020-03-13 20:55:18 +00:00
Dmitri Shuralyov
b2104f82a9 present: check if too few arguments to image, iframe, or video
Previously, using incorrect syntax for one of image, iframe, or video
functions caused an index out of range panic. Add a check to prevent
the panic and return an error instead.

Fixes golang/go#35142

Change-Id: Ifffb4cc5daded5331d617a3db7cad84e37abadc8
Reviewed-on: https://go-review.googlesource.com/c/tools/+/203477
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2019-10-26 03:49:45 +00:00
Robert Daniel Kortschak
53915e22e2 go.tools/present: allow intentionally empty parameters
Fixes golang/go#7613.

LGTM=r
R=adg, r
CC=golang-codereviews
https://golang.org/cl/105070043
2014-06-12 15:45:26 -07:00
Andrew Gerrand
9fc516408c go.tools/godoc/present: move present package from go.talks
Godoc depends on go.talks/pkg/present by way of go.tools/pkg/blog.
Better to keep all godoc dependencies in one place.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/13656047
2013-09-19 10:55:46 +10:00