plugin:getraw
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
plugin:getraw [2018-12-20 17:02] – zioth | plugin:getraw [2021-07-07 05:51] – accept tag with language declared for syntax highlight, and .htaccess with option for ".c" beco | ||
---|---|---|---|
Line 36: | Line 36: | ||
$file = rawWiki($ID); | $file = rawWiki($ID); | ||
if ($onlyCode) | if ($onlyCode) | ||
- | $file = preg_replace('/ | + | $file = preg_replace('/ |
if ($insideTag) | if ($insideTag) | ||
$file = preg_replace('/ | $file = preg_replace('/ | ||
Line 43: | Line 43: | ||
else | else | ||
print " | print " | ||
+ | ?> | ||
</ | </ | ||
Line 92: | Line 93: | ||
=== Change Log === | === Change Log === | ||
+ | * **2021-07-07** | ||
+ | * With a simple regex added to the code < | ||
* **2015-06-19** | * **2015-06-19** | ||
* Removed some unnecessary code from the script. This plugin is no longer dependent on the version of DokuWiki. Tested with DokuWiki Hrun. | * Removed some unnecessary code from the script. This plugin is no longer dependent on the version of DokuWiki. Tested with DokuWiki Hrun. | ||
Line 116: | Line 119: | ||
==== Usability suggestions ==== | ==== Usability suggestions ==== | ||
- | For ease of use, you can set up another rewrite rule in your .htaccess so that a user only needs to add .txt to their URL to get the text format: | + | For ease of use, you can set up another rewrite rule in your .htaccess so that a user only needs to add .txt to their URL to get the text format. Also, optionally, add .c to the URL to get only the the source inside the code tags. |
- | '' | + | '' |
+ | '' | ||
- | Also for readability, | + | Also for readability, |
plugin/getraw.txt · Last modified: 2021-07-07 05:54 by beco