mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 22:50:35 +03:00
Improve shortcode indentation handling
* Record the leading whitespace (tabs, spaces) before the shortcode when parsing the page. * Apply that indentation to the rendered result of shortcodes without inner content (where the user will apply indentation). Fixes #9946
This commit is contained in:
parent
322d19a81f
commit
d2cfaede5b
9 changed files with 208 additions and 4 deletions
|
@ -149,6 +149,11 @@ func (t *Iterator) Backup() {
|
|||
t.lastPos--
|
||||
}
|
||||
|
||||
// Pos returns the current position in the input.
|
||||
func (t *Iterator) Pos() int {
|
||||
return t.lastPos
|
||||
}
|
||||
|
||||
// check for non-error and non-EOF types coming next
|
||||
func (t *Iterator) IsValueNext() bool {
|
||||
i := t.Peek()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue