aboutsummaryrefslogtreecommitdiff
path: root/formatter
Commit message (Collapse)AuthorAgeFilesLines
* Remove the ‘>’ prefixv3.0.0Thomas Voss 2023-11-012-13/+5
| | | | | | The rationale was explained on the mailing list[1]. [1]: https://paste.thomasvoss.com/353
* Allow for true HTML ID- and class shorthandsv2.0.0Thomas Voss 2023-10-281-3/+3
|
* Rename some testsThomas Voss 2023-10-211-3/+3
|
* Run ‘go fmt’Thomas Voss 2023-10-211-2/+2
|
* Add tests for the formatterThomas Voss 2023-10-211-0/+258
|
* Escape runes in class namesThomas Voss 2023-10-211-8/+12
| | | | | | I cannot think of a single situation where you’d ever end up in this situation, and I also am not even sure if it’s even meant to be legal HTML. Better to be on the safe side I guess.
* Fix printing classes and attrsv1.0.2jturtle 2023-10-201-1/+1
| | | | | | | | | Well well well, here we are again. Iterate over the `nClasses` list instead of every attr after printing the classes. With all due respect, you should consider writing a test suite to catch silly errors like this.
* Don’t use lambdas, and just use a damn for-loopThomas Voss 2023-10-101-9/+10
|
* Remove whitespaceThomas Voss 2023-10-021-2/+0
|
* Fix class/attribute mixup bugjturtle 2023-10-021-1/+4
| | | | | | | | | | | | | | | | | | There's a bug in the current version of GSP where an element like this: p .class attribute="value" {-} would be transpiled as this: <p class="value" attribute="value"></p> The `classes` slice in `func printAttrs` (`formatter.go`, line 50) was the cause. I fixed it by making a deep copy of the `attrs` slice. I'm not a Go programmer, there might be a nicer way to make a deep copy of a slice. But it does, indeed, work. P.S. thanks for making this, writing HTML by hand is now slightly less painful!
* Run ‘go fmt’Thomas Voss 2023-09-111-9/+9
|
* Add the ‘=’ node for whitespace trimmingThomas Voss 2023-09-111-0/+8
|
* Add the ‘>’ node modifierThomas Voss 2023-09-111-0/+4
|
* Fix a panicThomas Voss 2023-09-101-1/+1
|
* Remove all XML supportThomas Voss 2023-09-101-22/+2
|
* Rework some of the formatting- and parsing codeThomas Voss 2023-09-101-79/+88
|
* Add primitive support for doctypes and XMLThomas Voss 2023-09-091-14/+41
|
* Fix bug when key has no valueThomas Voss 2023-09-091-1/+1
|
* Consistent code styleThomas Voss 2023-09-091-1/+1
|
* Genesis commitThomas Voss 2023-09-081-0/+104