0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-19 04:42:32 -05:00
Commit graph

10 commits

Author SHA1 Message Date
Martin
a0c4c1ce0d
Fixes cli error for Asciidoctor ()
The original fix for  introduced illegal arguments for Asciidoctor, causing no rendering at all. This PR fixes the command line arguments so that Asciidoctor properly renders the text. See https://asciidoctor.org/docs/user-manual/#piping-content-through-the-cli as reference.
2020-09-02 11:01:28 -04:00
Alexander Scheel
1bf9e44bda
Fix sanitizer config - multiple rules ()
In , it was reported that my earlier pull request  didn't quite function as expected. I was quite hopeful the `ValuesWithShadow()` worked as expected (and, I thought my testing showed it did) but I guess not. @zeripath proposed an alternative syntax which I like:

```ini
[markup.sanitizer.1]
ELEMENT=a
ALLOW_ATTR=target
REGEXP=something
[markup.sanitizer.2]
ELEMENT=a
ALLOW_ATTR=target
REGEXP=something
```

This was quite easy to adopt into the existing code. I've done so in a semi-backwards-compatible manner:

 - The value from `.Value()` is used for each element.
 - We parse `[markup.sanitizer]` and all `[markup.sanitizer.*]` sections and add them as rules.

This means that existing configs will load one rule (not all rules). It also means people can use string identifiers (`[markup.sanitiser.KaTeX]`) if they prefer, instead of numbered ones.

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-04-29 12:34:59 +01:00
Johan Van de Wauw
dfca884b15
doc: Fix package name in external renderer example ()
The py3-zmq package does not exist in alpine linux 3.11, used in both master and 1.11.4 . The py3-pyzmq package exists however:
https://pkgs.alpinelinux.org/packages?name=py3-pyzmq&branch=v3.11
2020-04-21 16:36:27 -04:00
David Svantesson
9bc8413534 Add documentation how to render PlantUML in code blocks. ()
* Add documentation how to render plantuml in code blocks.

* Review comments

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
2020-01-21 00:34:23 +01:00
Alexander Scheel
ee7df7ba8c Markdown: Sanitizier Configuration ()
* Support custom sanitization policy

Allowing the gitea administrator to configure sanitization policy allows
them to couple external renders and custom templates to support more
markup. In particular, the `pandoc` renderer allows generating KaTeX
annotations, wrapping them in `<span>` elements with class `math` and
either `inline` or `display` (depending on whether or not inline or
block mode was requested).

This iteration gives the administrator whitelisting powers; carefully
crafted regexes will thus let through only the desired attributes
necessary to support their custom markup.

Resolves: 

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Document new sanitization configuration

 - Adds basic documentation to app.ini.sample,
 - Adds an example to the Configuration Cheat Sheet, and
 - Adds extended information to External Renderers section.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Drop extraneous length check in newMarkupSanitizer(...)

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Fix plural ELEMENT and ALLOW_ATTR in docs

These were left over from their initial names. Make them singular to
conform with the current expectations.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
2019-12-07 14:49:04 -05:00
Chris Sexton
560a511a35 Change external asciidoctor tool to embeded mode ()
Ref 

* add the `-e` flag for embedded mode
* add a level offset to include the title of the document
2019-10-25 11:11:14 +01:00
Bill Wenrich
41dcdbf500 [docs] Docker build - ZeroMQ dependency for Jupyter ()
* doc py3-zmq - ZeroMQ bindings for jupyter

 https://github.com/go-gitea/gitea/issues/7970

* rebase Dockerfile to 1.9.x for jupyter

* [docs] external-renderers.en-us.md - use templated variable for version

Co-Authored-By: techknowlogick <matti@mdranta.net>
2019-09-26 09:04:53 +02:00
guillep2k
3b97b9efbf Correct formatting of bullet list () 2019-08-08 07:47:57 +03:00
Aidan Fitzgerald
f5cf9a8355 Copyedit docs () 2019-03-09 16:15:45 -05:00
Juan Pablo Santos Rodríguez
49d9900b1f [website] file rendering through external binaries ()
* : [doc] file rendering through external binaries

* fix subsections markup

* include proposed changes from PR review
2018-11-23 10:07:08 -05:00