Honour org :noweb strip-export parameter when writing HTML
Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
This commit is contained in:
parent
d31a96a3c0
commit
5f599b9e66
1 changed files with 4 additions and 0 deletions
|
@ -152,6 +152,10 @@ func (w *HTMLWriter) WriteBlock(b Block) {
|
|||
if params[":exports"] == "results" || params[":exports"] == "none" {
|
||||
break
|
||||
}
|
||||
if params[":noweb"] == "strip-export" {
|
||||
stripNoweb := regexp.MustCompile(`<<[^>]+>>`)
|
||||
content = stripNoweb.ReplaceAllString(content, "")
|
||||
}
|
||||
lang := "text"
|
||||
if len(b.Parameters) >= 1 {
|
||||
lang = strings.ToLower(b.Parameters[0])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue