#4614 filters.py: Add asciidoc syntax override
Merged by pingou. Opened by ferdnyc.
ferdnyc/pagure adoc-override  into  master

Download 4614.patch

highlight.js has trouble automatically recognizing ASCIIdoc (the content format for Fedora Docs, significantly), often mis-identifying it as SQL code based on the vast number of SQL keywords that frequently appear in plain text.

(Examples: here, here, and many more easily found by browsing the Docs repos.)

Since .adoc files should always be highlighted as ASCIIdoc, this adds an extension mapping to the default syntax overrides.

rebased onto 04518b950ba54d4c84dc69d90c0e3912d9340fcc

Code reformatted to appease Black.

:thumbsup:

I'm not really clear on why the tests failed this time, TBH, or how my change could've possibly caused it. The first failure:

======================================================================
FAIL: test_api_view_user_activity_date (tests.test_pagure_flask_api_user.PagureFlaskApiUSertests): Test the api_view_user_activity_date method of the flask user
        api.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/pagure/.tox/py35-flask100-ci/lib/python3.5/site-packages/mock/mock.py", line 1330, in patched
    return func(*args, **keywargs)
  File "/pagure/tests/test_pagure_flask_api_user.py", line 333, in test_api_view_user_activity_date
    self.assertEqual(output.status_code, 200)
AssertionError: 400 != 200

The code at test_pagure_flask_api_user.py from line 331:

# Invalid date
output = self.app.get("/api/0/user/pingou/activity/2016asd")
self.assertEqual(output.status_code, 200)
exp = {"activities": [], "date": "2016-01-01"}
self.assertEqual(json.loads(output.get_data(as_text=True)), exp)

Looks like I can restart the tests, so I'll try that.

pretty please pagure-ci rebuild

The test suite is failing due to #4611 . #4612 should temporary fix it.

Looks like I cannot rebase the PR, could you do it?

Thanks :)

2 new commits added

  • Merge branch 'adoc-override' of ssh://pagure.io/forks/ferdnyc/pagure into adoc-override
  • filters.py: Add asciidoc syntax override

@pingou Sure, done!

(Edit: ...And re-squashed.)

rebased onto a144370dd0a6cd33e3655f9728b772eb54cb3afa

Thanks! :)

Pull-Request has been merged by pingou

Metadata