Skip to content
Snippets Groups Projects

Make rest2html work with docutils 0.13

Merged Gabriel Mazetto requested to merge docutils-0.13-support into master

Imported a PR https://github.com/github/markup/pull/976 reffered by @pravi in https://gitlab.com/gitlab-org/gitlab-markup/issues/5.

In that docutils version, HTMLTranslator.visit_image no longer appends
empty string to self.context, so trying to pop() from there raises an
IndexError.

Instead of the hard-coded pop call, call the overridden method, which will
call pop() on docutils 0.12 and will do nothing on docutils 0.13.

Also, fix the comment indentation.

cc @marin

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading