Browse Source

readme.md支持图片相对路径

pull/313/head
xiaoxiaoqiong 4 years ago
parent
commit
fe5c18c019
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      app/helpers/repositories_helper.rb

+ 1
- 2
app/helpers/repositories_helper.rb View File

@@ -48,8 +48,7 @@ module RepositoriesHelper
def readme_render_decode64_content(str, owner, repo, ref, path)
return nil if str.blank?
begin
# content = Base64.decode64(str).force_encoding('UTF-8')
content = "# CMSIS-NN cifar10 example\n<img src=\"../5.jpg\"/><img src='../4.jpg'/>(https://github.com/ARM-software)/**[ML-examples](https://github.com/ARM-software/ML-examples)**] and can be deployed on Arm Cortex-M CPUs using [CMSIS-NN](https://github.com/ARM-software/CMSIS_5).\n\n## Requirements:\n- CMSIS-NN in Framework/knowing/cmsis_5\n- TJpgDec in Framework/knowing/image_processing\n- Enough stack size (recommend 10240) for finsh thread which can be changed in \"RT-Thread Components->Command shell->finsh shell\" by menuconfig.\n\n## To run this demo:\n- Place the photo where you want\n- Run demo by type the command\n ``` \n cmsisnn_demo /path/to/photo"
content = Base64.decode64(str).force_encoding('UTF-8')

c_regex = /\!\[.*?\]\((.*?)\)/
src_regex = /src=\"(.*?)\"/


Loading…
Cancel
Save