k3s/cmd/mungedocs
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
..
testdata examples munger allows any file extension. 2015-12-07 14:18:42 -08:00
BUILD Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
README.md Fix typos and linted_packages sorting 2016-10-31 18:31:08 +01:00
analytics.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
analytics_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
example_syncer.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
example_syncer_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
headers.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
headers_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kubectl_dash_f.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kubectl_dash_f_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
links.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
links_test.go fix mungedocs unit tests 2016-12-29 13:04:10 -08:00
mungedocs.go Update the latestReleaseBranch to release-1.5 in the munger. 2016-11-05 19:56:24 -07:00
preformatted.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
preformatted_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
toc.go Fix mungedocs TOC generation 2016-07-07 13:30:55 -07:00
toc_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
util.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
util_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
whitespace.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
whitespace_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00

README.md

Documentation Mungers

Basically this is like lint/gofmt for md docs.

It basically does the following:

  • iterate over all files in the given doc root.
  • for each file split it into a slice (mungeLines) of lines (mungeLine)
  • a mungeline has metadata about each line typically determined by a 'fast' regex.
    • metadata contains things like 'is inside a preformatted block'
    • contains a markdown header
    • has a link to another file
    • etc..
    • if you have a really slow regex with a lot of backtracking you might want to write a fast one to limit how often you run the slow one.
  • each munger is then called in turn
    • they are given the mungeLines
    • they create an entirely new set of mungeLines with their modifications
    • the new set is returned
  • the new set is then fed into the next munger.
  • in the end we might commit the end mungeLines to the file or not (--verify)

Analytics