Lauris BH
086a46994a
Rewrite markdown rendering to blackfriday v2 and rewrite orgmode rendering to go-org ( #8560 )
...
* Rewrite markdown rendering to blackfriday v2.0
* Fix style
* Fix go mod with golang 1.13
* Fix blackfriday v2 import
* Inital orgmode renderer migration to go-org
* Vendor go-org dependency
* Ignore errors :/
* Update go-org to latest version
* Update test
* Fix go-org test
* Remove unneeded code
* Fix comments
* Fix markdown test
* Fix blackfriday regression rendering HTML block
5 years ago
Lunny Xiao
8ad64574ee
Fix markdown invoke sequence ( #7513 )
5 years ago
Roland Koebler
57ecf09787
Markdown: enable some more extensions ( #6362 )
...
* Markdown: enable some more extensions
Improve Markdown-rendering by enabling some extensions:
- enable definitions lists
- enable footnotes
- enable header-ids and automatically generate header-ids (for linking to README-sections or creating table-of-contents for larger READMEs)
* Markdown: update and exted tests
Update and add tests for additionally enabled Markdown-extensions.
6 years ago
zeripath
2a03e96bce
Allow markdown files to read from the LFS ( #5787 )
...
This PR makes it possible for the markdown renderer to render images and media straight from the LFS.
Fix #5746
Signed-off-by: Andrew Thornton [art27@cantab.net ](mailto:art27@cantab.net)
6 years ago
L.E.R
b686bd0c94
Fix markdown image with link ( #4675 )
...
* Fix markdown image with link
* Add gitea copyright notice
* add a test for markdown image with link
* remove svg related variables
6 years ago
Jonas Franz
2a60e72fcd
Replace src with raw to fix image paths ( #4377 )
...
Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Morgan Bazalgette
535445c32e
Rework special link parsing in the post-processing of markup ( #3354 )
...
* Get rid of autolink
* autolink in markdown
* Replace email addresses with mailto links
* better handling of links
* Remove autolink.js from footer
* Refactor entire html.go
* fix some bugs
* Make tests green, move what we can to html_internal_test, various other changes to processor logic
* Make markdown tests work again
This is just a description to allow me to force push in order to restart
the drone build.
* Fix failing markdown tests in routers/api/v1/misc
* Add license headers, log errors, future-proof <body>
* fix formatting
7 years ago
Ethan Koenig
7b104f0cd0
Populate URL field of API commits ( #3546 )
...
* Populate URL field of API commits
* fix orgmode_test
7 years ago
Lunny Xiao
0d80af649a
Add init support of orgmode document type on file view and readme ( #2525 )
...
* add init support of orgmode document type on file view and readme
* fix imports
* fix imports and readmeExist
* fix imports order
* fix format
* remove unnecessary convert
7 years ago
Lunny Xiao
52e11b24bf
Restructure markup & markdown to prepare for multiple markup language… ( #2411 )
...
* restructure markup & markdown to prepare for multiple markup languages support
* adjust some functions between markdown and markup
* fix tests
* improve the comments
7 years ago
Ethan Koenig
29f3a6e492
Fix rendering of external links ( #2292 )
7 years ago
Michael Kuhn
d05150a331
Make short link pattern greedy ( #2259 )
...
Multiple links on the same line are currently not recognized correctly.
7 years ago
Roy Marples
89845f6728
Fix SHA1 hash linking ( #2143 )
...
This changes the regex to look for a hash from 7 to 40 characters,
to match the use of abbreviated hash lookups in both git and github.
The restriction of not being a pure number is also removed because
1234567 is now considered a valid abbreviated hash, as is deadbeef.
A note has been added to the top of the code to state that the
literal regex match is fine, but no extra validation is currently
performed so some false positives are expected.
A future change could ensure that the hash exists in the repository
before rendering it as a link, although this might incur a slight
performance penalty.
Reverts part of commit 4a46613
and fixes #2053 .
7 years ago
Ethan Koenig
e58237ee3f
Fix import order
7 years ago
Ethan Koenig
b1d7348a20
Fix wiki preview links
7 years ago
Ethan Koenig
5ca3046da6
Fix rendering of issue checkboxes ( #1709 )
8 years ago
Lauris BH
9a0b0da1fe
Fix commit sha1 URL rendering in markdown ( #1677 )
...
* Fix commit sha1 URL rendering in markdown
* Add unit test for commit sha1 markdown rendering when sha1 has space before it
* Change to better variable name
8 years ago
Morlinest
fcc7cdab11
Fix markdown rendering ( #1530 )
8 years ago
Lunny Xiao
52627032bc
Add markup package to prepare for org markup format ( #1493 )
8 years ago
Kim "BKC" Carlbäcker
d409d3ab57
Sanitation fix from Gogs ( #1461 )
...
* Santiation fix from Gogs
* Linting
* Fix build-errors
* still not working
* Fix all the things!
* gofmt
* Add code-injection checks
8 years ago
Andrew Boyarshin
0602a44b27
Fix URL handling in the whole markdown module, improve test coverage ( #1027 )
...
Amended with string to bool change in API SDK.
Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
8 years ago
Andrew Boyarshin
dc8248f8a4
Markdown rendering overhaul ( #186 )
...
* Markdown rendering overhaul
Cleaned up and squashed commits into single one.
Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
* Fix markdown API, add markdown module and API tests, improve code coverage
Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
8 years ago
Bo-Yi Wu
25663b5816
refactor: Remove unnecessary type conversions ( #772 )
8 years ago
Sandro Santilli
71634452e1
Improve issue references in markdown ( #471 )
...
* Improve issue references in markdown. (#3436 )
* Fix build
* Fix lint
* Fix comment typo
8 years ago
Lunny Xiao
94da472717
Golint fixed for modules/setting ( #262 )
...
* golint fixed for modules/setting
* typo fixed and renamed UNIXSOCKET to UnixSocket
8 years ago
Lunny Xiao
304bbd3f25
golint fixed for modules/markdown
8 years ago
Sandro Santilli
4247304f5a
Update import paths from github.com/go-gitea to code.gitea.io ( #135 )
...
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis
See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
8 years ago
Rémy Boulanouar
2d68bd1ef9
Change import reference to match gitea instead of gogs ( #37 )
8 years ago
Rémy Boulanouar
6bcff7828f
Fix mention in comments like ( @dblk ) ( #3655 )
...
* Fix mention in comments like (@dblk )
* Better fix to avoid making link for "Hello@DblK"
8 years ago
Rémy Boulanouar
5d35578811
Update size of SHA to fix #3538 ( #3563 )
8 years ago
Unknwon
4a46613916
markdown: fix treating pure number as SHA1
...
- Detect non-exist commit and return 404 not 500
8 years ago
Unknwon
15845cb287
Code clean up for new config options
8 years ago
Richard Mahn
d0a0239bac
Squashed commit of the following:
...
commit 0afcb843d7ffd596991c4885cab768273a6eb42c
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 17:13:29 2016 -0600
Removed Upload stats as the upload table is just a temporary table
commit 7ecd73ff5535612d79d471409173ee7f1fcfa157
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 08:42:41 2016 -0600
Fix for CodeMirror mode
commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 08:03:33 2016 -0600
Made tabbing in editor use spaces
commit 23af384c53206a8a40e11e45bf49d7a149c4adcd
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 07:56:46 2016 -0600
Fix for data-url
commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9
Merge: 7fc8a89 991ce42
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 07:42:53 2016 -0600
Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file
Conflicts:
modules/bindata/bindata.go
public/js/gogs.js
commit 7fc8a89cb495478225b02d613e647f99a1489634
Merge: fd3d86c c03d040
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 07:40:00 2016 -0600
Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file
commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Sun Jul 31 07:39:44 2016 -0600
Code cleanup
commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 29 15:38:23 2016 -0600
Code cleanup
commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Thu Jul 28 18:36:01 2016 -0600
Code cleanup and fixes
commit c2895dc742f25f8412879c9fa15e18f27f42f194
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Thu Jul 28 18:24:04 2016 -0600
Fixes per Unknwon's requests
commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef
Merge: 889e9fa ad7ea88
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Thu Jul 28 17:13:43 2016 -0600
Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file
Conflicts:
modules/bindata/bindata.go
modules/setting/setting.go
commit 889e9faf1bd8559a4979c8f46005d488c1a234d4
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 22 14:09:18 2016 -0600
Fix in gogs.js
commit 47603edf223f147b114be65f3bd27bc1e88827a5
Merge: bb57912 cf85e9e
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 22 14:07:36 2016 -0600
Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file
Conflicts:
modules/bindata/bindata.go
public/js/gogs.js
commit bb5791255867a71c11a77b639db050ad09c597a4
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 22 14:02:18 2016 -0600
Update for using CodeMirror mode addon
commit d10d128c51039be19e2af9c66c63db66a9f2ec6d
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Tue Jul 19 16:12:57 2016 -0600
Update for Edit
commit 34a34982025144e3225e389f7849eb6273c1d576
Merge: fa1b752 1c7dcdd
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Tue Jul 19 11:52:02 2016 -0600
Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file
Conflicts:
modules/bindata/bindata.go
commit fa1b752be29cd455c5184ddac2ffe80b3489763e
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date: Fri Jul 15 18:35:42 2016 -0600
Feature for editing, creating, uploading and deleting files
8 years ago
Thibault Meyer
7eafe3213f
Fix #3321 : commit tag shortener ( #3418 )
...
* Fix #3321 : commit tag shortener
* Check short commit
* remove debug
* Edit unit tests
* Show 10-char short SHA
8 years ago
Thibault Meyer
99812a80fd
Fix #3420 : Bad commit URL generation ( #3424 )
8 years ago
Unknwon
d7bdc1de8d
#3107 fix mention regex does not include dash
8 years ago
Unknwon
f1b8d52eb3
#2854 fix no mail notification when issue is closed/reopened
8 years ago
Cosmin Stroe
84841c8c4b
Stricter parsing of issue URLs and commit URLs. ( #3121 )
9 years ago
Cosmin Stroe
ba314a7a36
Support alphanumeric issue style (ABC-1234) for external issue tracker ( #2992 )
9 years ago
Odin Ugedal
8540043c45
Make separate string variables for space
9 years ago
Odin Ugedal
f57adf3637
Fix relative links in markdown files
...
Replace spaces with "%20" in "urlPrefix", before markdon processing.
The spaces were causing blackfriday (markdown processor) to behave
strange. This fixes #2545 .
9 years ago
Unknwon
d5a3021a7d
Make markdown as an independent module
9 years ago
Unknwon
341da3cea7
Fix inappropriate markdown post process end tag check
...
When <code> is nested inside <pre>, the next end tag token would not able to be the same
as outer-most start tag. So we only check outer-most start and end tag token to be the same.
9 years ago
Unknwon
8e40f86d2c
#2556 handle space in image URL
9 years ago
Unknwon
4848620594
#2229 adjust URL verbose depth for reverse proxy sub-path
9 years ago
Kim "BKC" Carlbäcker
1ab8a60d73
Not working, but slightly better...
9 years ago
Kim "BKC" Carlbäcker
3a9fd81f59
Custom URL-Schemas for Markdown
9 years ago
Kim "BKC" Carlbäcker
8e09e03127
Checklist-rendering implemented
9 years ago
Unknwon
cc8c67ff29
fix markdown autolink error
9 years ago
Unknwon
7e88420bc6
#2161 fix wrong regexp
9 years ago