FastComments.com

שיתוף קטעי קוד


שיתוף קטעי קוד


מהם קטעי קוד? Internal Link

Code snippets are small pieces of code, hence "snippets" of code, that can be shared while commenting.

דוגמה לקטע קוד
הערה שפורסמה שבה הקוד שהודבק מוצג כחלק קוד מודגש תחבירית בתוך גוף ההערה

With FastComments, simply pasting a snippet of code should automatically be detected and formatted.

When commenting, the code snippet will be wrapped in <code> blocks, and the formatting happens after you submit your comment.

The wrapping in <code> blocks is automatic when pasting a snippet of code, in many languages.

Alternatively, you can highlight a piece of text and click the Code button in the toolbar.

קהילות מפתחים Internal Link


שיתוף קטעי קוד מועיל לקהילות שבהן סביר שיהיה שיתוף של קוד.

זה מקל על קריאת קטעי הקוד המשותפים ודורש מאמץ מועט מהמשתמשים שלך.

אנו מקווים שהתכונה הזו הופכת את FastComments לבחירה אידיאלית עבור אתרים הקשורים לתכנות ו יישומים.


שפות תכנות נתמכות Internal Link


כשמשתפים קטעי קוד, FastComments עושה את מיטב יכולתו לזהות באופן אוטומטי באיזו שפת תכנות נמצא קטע הקוד, כדי לעצב אותו אוטומטית ולהחיל הדגשת תחביר.

FastComments syntax highlighting currently supports 39 common languages:

  • .properties
  • Apache
  • config
  • Bash
  • C
  • C#
  • C++
  • CSS
  • CoffeeScript
  • Diff
  • Go
  • HTML, XML
  • HTTP
  • JSON
  • Java
  • JavaScript
  • Kotlin
  • Less
  • Lua
  • Makefile
  • Markdown
  • Nginx
  • config
  • Objective-C
  • PHP
  • PHP Template
  • Perl
  • Plain text
  • Python
  • Python REPL
  • R
  • Ruby
  • Rust
  • SCSS
  • SQL
  • Shell
  • Session
  • Swift
  • TOML and INI
  • TypeScript
  • Visual Basic .NET
  • YAML

When sharing a code snippet in a language we don't support, it will still be rendered like code - but no syntax highlighting or reformatting will be applied.


הגדרת שיתוף קטעי קוד Internal Link

אין צורך בהגדרה כדי להפעיל תכונה זו. היא זמינה אוטומטית למשתמשים שלך כשמשתמשים ב-FastComments.

שיתוף קטעי קוד Internal Link


כדי להשתמש בתמיכה בקטעי קוד, פשוט הדבק כל קטע קוד שמזוח בשתי או ארבע רווחים, וכולל את התווים { או ( characters.

או לחלופין, הדבק את קטע הקוד שלך, סמן אותו, ולחץ על אפשרות Code בסרגל הכלים